Class: OptimistXL::SubcommandResult
- Inherits:
-
Object
- Object
- OptimistXL::SubcommandResult
- Defined in:
- lib/optimist_xl.rb
Overview
If used with subcommands, then return this object instead of a Hash.
Instance Attribute Summary collapse
-
#global_options ⇒ Object
Returns the value of attribute global_options.
-
#leftovers ⇒ Object
Returns the value of attribute leftovers.
-
#subcommand ⇒ Object
Returns the value of attribute subcommand.
-
#subcommand_options ⇒ Object
Returns the value of attribute subcommand_options.
Instance Method Summary collapse
-
#initialize(subcommand: nil, global_options: {}, subcommand_options: {}, leftovers: []) ⇒ SubcommandResult
constructor
A new instance of SubcommandResult.
Constructor Details
#initialize(subcommand: nil, global_options: {}, subcommand_options: {}, leftovers: []) ⇒ SubcommandResult
Returns a new instance of SubcommandResult.
757 758 759 760 761 762 |
# File 'lib/optimist_xl.rb', line 757 def initialize(subcommand: nil, global_options: {}, subcommand_options: {}, leftovers: []) @subcommand = subcommand @global_options = @subcommand_options = @leftovers = leftovers end |
Instance Attribute Details
#global_options ⇒ Object
Returns the value of attribute global_options.
763 764 765 |
# File 'lib/optimist_xl.rb', line 763 def @global_options end |
#leftovers ⇒ Object
Returns the value of attribute leftovers.
763 764 765 |
# File 'lib/optimist_xl.rb', line 763 def leftovers @leftovers end |
#subcommand ⇒ Object
Returns the value of attribute subcommand.
763 764 765 |
# File 'lib/optimist_xl.rb', line 763 def subcommand @subcommand end |
#subcommand_options ⇒ Object
Returns the value of attribute subcommand_options.
763 764 765 |
# File 'lib/optimist_xl.rb', line 763 def @subcommand_options end |