DSL-mode parser.
# File lib/more/facets/getoptlong.rb, line 50 def initialize(&block) @arguments = [] instance_eval(&block) end
# File lib/more/facets/getoptlong.rb, line 55 def flag(*opts) @arguments << (opts << GetoptLong::NO_ARGUMENT) end
# File lib/more/facets/getoptlong.rb, line 64 def optional(*opts) @arguments << (opts << GetoptLong::OPTIONAL_ARGUMENT) end
# File lib/more/facets/getoptlong.rb, line 59 def required(*opts) @arguments << (opts << GetoptLong::REQUIRED_ARGUMENT) end