qanda 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6b1fdeb78b7c55eafd6212ffa7ce2ac939b88e5
4
- data.tar.gz: cac1aa19f4c1ca1fd44066b78a3c06086d9f3874
3
+ metadata.gz: 1103cf13ede7744d45ab1aeabbb3dbc6e45ec279
4
+ data.tar.gz: fdc662158a8fa92e385e4b8775f43052ff27bd04
5
5
  SHA512:
6
- metadata.gz: 9b5ba4e407117a11cc2a4a61786e9eb47618c0d251c5504d258dfd9eb098b2e25777b3907263b3475982eec60e05d0a9de19df28e00c1ffcadd5ee2cba42c03b
7
- data.tar.gz: da1d64ccfafd5e3985a73f7625fe12f560b48462e3a44d427ac6f7ed694814ac1a0f70d6352e2da0127150205872b1a4f4b5766b3deb58811e79bec59830253d
6
+ metadata.gz: fdb8199f4bdf283727e7420c2fc254d2974231bb16750eeaee02e3ee804acb92c6272e5a5bb43288fd59e94a4db68f0e611110c43046785056045468498aa472
7
+ data.tar.gz: 33d1a6802d47150618a7daa49e566d40456a3c77a5e1070e100e1cc35d0f12b30060e227bc6d5c08faff7550562e073ac941ee3fd090a80b1285d27091aa0339
data/lib/qanda/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qanda
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -13,8 +13,8 @@ module QandA
13
13
  @choices = choices
14
14
  raise InvalidQuestionError.new(NOT_ENOUGH_OPTIONS_ERR) unless choices.is_a?(Array) && choices.size > 1
15
15
  raise InvalidQuestionError.new(DEFAULT_IS_INTEGER_ERR) unless default.nil? || answer_string_is_valid?(default)
16
- raise InvalidQuestionError.new(@MAXIMUM_NO_ZERO_ERR) unless @minimum > 0 && @maximum <= choices.size
17
- raise InvalidQuestionError.new(@MINIMUM_NO_ZERO_ERR) unless @maximum > 0 && @minimum <= choices.size - 1
16
+ raise InvalidQuestionError.new(MAXIMUM_NO_ZERO_ERR) unless @minimum > 0 && @maximum <= choices.size
17
+ raise InvalidQuestionError.new(MINIMUM_NO_ZERO_ERR) unless @maximum > 0 && @minimum <= choices.size - 1
18
18
  raise InvalidQuestionError.new(MIN_GREATER_THAN_MAX) unless @maximum >= @minimum
19
19
  super(message: message, default: default)
20
20
  @validation = Proc.new { |answer| answer_string_is_valid?(answer) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qanda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wesley Boynton