Class: OptionsParser
- Inherits:
-
Object
- Object
- OptionsParser
- Defined in:
- lib/obfuskit/options_parser.rb
Defined Under Namespace
Classes: ScriptOptions
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Instance Method Summary collapse
-
#parse(args) ⇒ Object
Return a structure describing the options.
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
104 105 106 |
# File 'lib/obfuskit/options_parser.rb', line 104 def end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
104 105 106 |
# File 'lib/obfuskit/options_parser.rb', line 104 def parser @parser end |
Instance Method Details
#parse(args) ⇒ Object
Return a structure describing the options.
92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/obfuskit/options_parser.rb', line 92 def parse(args) # The options specified on the command line will be collected in # *options*. = ScriptOptions.new OptionParser.new do |parser| .(parser) parser.parse!(args) end end |