opt-simple 0.9.11 → 0.9.12
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/lib/opt_simple.rb +2 -1
- metadata +2 -2
data/README
CHANGED
@@ -63,7 +63,7 @@ It is recommended to install OptSimple using RubyGems:
|
|
63
63
|
|
64
64
|
option %w[-p --pattern --glob-pattern], "glob pattern","PATTERN"
|
65
65
|
|
66
|
-
# this block has arity 2, so it expects
|
66
|
+
# this block has arity 2, so it expects two args to follow
|
67
67
|
option "--range", "range: min,max (both >0)" do | arg1,arg2 |
|
68
68
|
min,max = [arg1.to_i,arg2.to_i]
|
69
69
|
set_opt [min,max]
|
data/lib/opt_simple.rb
CHANGED
@@ -62,7 +62,8 @@ class OptSimple
|
|
62
62
|
# call the block to register all the parameters and
|
63
63
|
# their corresponding code blocks
|
64
64
|
# We use instance_exec so that the API is cleaner.
|
65
|
-
instance_exec(@results,&block)
|
65
|
+
instance_exec(@results,&block)
|
66
|
+
self
|
66
67
|
end
|
67
68
|
|
68
69
|
# Parse the options, destructively pulling them out of the args array as it goes.
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: opt-simple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.9.
|
5
|
+
version: 0.9.12
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ethan Stryker
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-12-27 00:00:00 +00:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|