lib/masticate/myoptparse.rb in masticate-0.2.2 vs lib/masticate/myoptparse.rb in masticate-0.2.3
- old
+ new
@@ -35,10 +35,11 @@
opts.on("--field FIELD", String, "Specify field to convert") do |f|
@options[:field] = f
end
- opts.on("--value VALUE", String, "(*exclude* only) Value to compare field to for exclusion") do |s|
+ # if I specify String here, then a blank string '' is considered invalid and triggers an exception.
+ opts.on("--value VALUE", "(*exclude* only) Value to compare field to for exclusion") do |s|
@options[:value] = s
end
opts.on("--snip DIRECTIVE", String, "Specify header fields to snip: first N, or by name") do |f|
@options[:snip] = f.to_i