Class: Escort::OptionParser
- Inherits:
-
Object
- Object
- Escort::OptionParser
- Defined in:
- lib/escort/option_parser.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#setup ⇒ Object
readonly
Returns the value of attribute setup.
Instance Method Summary collapse
-
#initialize(configuration, setup) ⇒ OptionParser
constructor
A new instance of OptionParser.
- #parse(cli_options) ⇒ Object
Constructor Details
#initialize(configuration, setup) ⇒ OptionParser
Returns a new instance of OptionParser.
5 6 7 8 |
# File 'lib/escort/option_parser.rb', line 5 def initialize(configuration, setup) @configuration = configuration @setup = setup end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
3 4 5 |
# File 'lib/escort/option_parser.rb', line 3 def configuration @configuration end |
#setup ⇒ Object (readonly)
Returns the value of attribute setup.
3 4 5 |
# File 'lib/escort/option_parser.rb', line 3 def setup @setup end |
Instance Method Details
#parse(cli_options) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/escort/option_parser.rb', line 10 def parse() = (, [:global][:options]) (, [], [:global][:commands]) [, arguments_from()] end |