config_parser 0.3.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History +5 -0
- data/lib/config_parser/flag.rb +2 -2
- data/lib/config_parser/version.rb +2 -2
- data/lib/config_parser.rb +3 -3
- metadata +5 -5
data/History
CHANGED
data/lib/config_parser/flag.rb
CHANGED
data/lib/config_parser.rb
CHANGED
@@ -225,9 +225,9 @@ class ConfigParser
|
|
225
225
|
#
|
226
226
|
# If a string argv is provided, it will be splits into an array using
|
227
227
|
# Shellwords.
|
228
|
-
def parse(argv=ARGV)
|
228
|
+
def parse(argv=ARGV, &block)
|
229
229
|
argv = argv.dup unless argv.kind_of?(String)
|
230
|
-
parse!(argv)
|
230
|
+
parse!(argv, &block)
|
231
231
|
end
|
232
232
|
|
233
233
|
# Same as parse, but removes parsed args from argv.
|
@@ -281,7 +281,7 @@ class ConfigParser
|
|
281
281
|
args.concat(argv)
|
282
282
|
argv.replace(args)
|
283
283
|
|
284
|
-
argv
|
284
|
+
block_given? ? yield(argv, config) : argv
|
285
285
|
end
|
286
286
|
|
287
287
|
# Resets each option and clears the config (if specified). Returns self.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: config_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Simon Chiang
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-21 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|