Method: ArgParser::Parser#initialize
- Defined in:
- lib/arg-parser/parser.rb
#initialize(definition = nil) ⇒ Parser
Instantiates a new command-line parser, with the specified command- line definition. A Parser instance delegates unknown methods to the Definition, so its possible to work only with a Parser instance to both define and parse a command-line.
37 38 39 40 |
# File 'lib/arg-parser/parser.rb', line 37 def initialize(definition = nil) @definition = definition || Definition.new @errors = [] end |