optparse-simple 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/optparse-simple.rb +3 -3
- metadata +1 -1
data/lib/optparse-simple.rb
CHANGED
@@ -8,9 +8,9 @@ class OptParseSimple
|
|
8
8
|
|
9
9
|
# -- bind any loose value to their argument
|
10
10
|
xpath = 'records/option/summary[switch != "" and value != ""]'
|
11
|
-
options = XPath.match(doc.root, xpath)
|
12
|
-
.map {|node| %w(switch alias)
|
13
|
-
.map{|x| node.text(x)}.compact}
|
11
|
+
options = XPath.match(doc.root, xpath)\
|
12
|
+
.map {|node| %w(switch alias)\
|
13
|
+
.map{|x| node.text(x)}.compact}\
|
14
14
|
.flatten
|
15
15
|
args.map!.with_index do |x,i|
|
16
16
|
next unless x or i < args.length - 1
|