Class: GLI::OptionParsingResult
- Inherits:
-
Object
- Object
- GLI::OptionParsingResult
- Defined in:
- lib/gli/option_parsing_result.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#cli_options ⇒ Object
Returns the value of attribute cli_options.
-
#command ⇒ Object
Returns the value of attribute command.
-
#command_options ⇒ Object
Returns the value of attribute command_options.
-
#global_options ⇒ Object
Returns the value of attribute global_options.
Instance Method Summary collapse
- #convert_to_openstruct! ⇒ Object
-
#to_a ⇒ Object
Allows us to splat this object into blocks and methods expecting parameters in this order.
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
6 7 8 |
# File 'lib/gli/option_parsing_result.rb', line 6 def arguments @arguments end |
#cli_options ⇒ Object
Returns the value of attribute cli_options.
8 9 10 |
# File 'lib/gli/option_parsing_result.rb', line 8 def @cli_options end |
#command ⇒ Object
Returns the value of attribute command.
4 5 6 |
# File 'lib/gli/option_parsing_result.rb', line 4 def command @command end |
#command_options ⇒ Object
Returns the value of attribute command_options.
5 6 7 |
# File 'lib/gli/option_parsing_result.rb', line 5 def @command_options end |
#global_options ⇒ Object
Returns the value of attribute global_options.
3 4 5 |
# File 'lib/gli/option_parsing_result.rb', line 3 def @global_options end |
Instance Method Details
#convert_to_openstruct! ⇒ Object
10 11 12 13 14 |
# File 'lib/gli/option_parsing_result.rb', line 10 def convert_to_openstruct! @global_options = Options.new(@global_options) @command_options = Options.new(@command_options) self end |
#to_a ⇒ Object
Allows us to splat this object into blocks and methods expecting parameters in this order
17 18 19 |
# File 'lib/gli/option_parsing_result.rb', line 17 def to_a [@global_options,@command,@command_options,@arguments] end |