shellopts 2.0.1 → 2.0.2

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
  SHA256:
3
- metadata.gz: 4f5448df8e0fdd882072ab927e185511b09ebd8b594a9556937fdfd20d41070d
4
- data.tar.gz: 2743f77e88de6ff10562a2f7d3980b1bfc730d0e024e60e6472da48342a2f153
3
+ metadata.gz: 013afe67b6f86e17d37bfbd1b18f3b4b7e7e5026d3249900326b23d1ed75ed95
4
+ data.tar.gz: 7ccfcca5ef44d9958e3f03ea23ea211893357ff32c7c5e5fdc4953ec61548306
5
5
  SHA512:
6
- metadata.gz: 9e08795c96b4f745a00cb6c38e5ea63beef08ceb640a0427d4bc46ee705189cab188a227a9d1775177d6530596155744d6e8624fa378c87c47f94c36e1adf98b
7
- data.tar.gz: cb12f16c665fe6fc0e0751ad2328aa7d8e1e48baad9d9d27addb4d88f6a083d780c61ee0b8b57e8218ee829a6e107afa8c076067dfa5d24a973bf353489d7433
6
+ metadata.gz: 5a50d291b69952d04bc054ea09cf292f6df414a4d6e1df69ac47cb3d2489626301c7eba4f66edd268f1c486463d6c37a1fd0b3cd431060c7100da980272c2b9e
7
+ data.tar.gz: 0bd422a52a4b11f69ade0d744df2a0bf8db6a05d67e282bfadb6a1a72af6f1ebe21ec0dd24b8ce663379d9e69db643036606e2fc1e502995e24f2f7b5c8bdea3
@@ -14,8 +14,8 @@ module ShellOpts
14
14
  # safe for concurrent processing
15
15
  attr_reader :message
16
16
 
17
- # Return true if .value is an "instance" of self (not used atm. See
18
- # Command#[] and Grammar::Option#value?)
17
+ # Return true if .value is an "instance" of self. Ie. an Integer object
18
+ # if type is an IntegerArgument
19
19
  def value?(value) true end
20
20
 
21
21
  # Convert value to Ruby type
@@ -131,7 +131,7 @@ module ShellOpts
131
131
  class EnumArgument < ArgumentType
132
132
  attr_reader :values
133
133
  def initialize(values) @values = values.dup end
134
- def match?(name, literal) literal?(literal) or set_message "Illegal value in #{name}: '#{literal}'" end
134
+ def match?(name, literal) value?(literal) or set_message "Illegal value in #{name}: '#{literal}'" end
135
135
  def value?(value) @values.include?(value) end
136
136
  end
137
137
  end
@@ -1,3 +1,3 @@
1
1
  module ShellOpts
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellopts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen