Class: OptimistXL::SubcommandResult

Inherits:
Object
  • Object
show all
Defined in:
lib/optimist_xl.rb

Overview

If used with subcommands, then return this object instead of a Hash.

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = global_options
  @subcommand_options = subcommand_options
  @leftovers = leftovers
end

Instance Attribute Details

#global_optionsObject

Returns the value of attribute global_options.



763
764
765
# File 'lib/optimist_xl.rb', line 763

def global_options
  @global_options
end

#leftoversObject

Returns the value of attribute leftovers.



763
764
765
# File 'lib/optimist_xl.rb', line 763

def leftovers
  @leftovers
end

#subcommandObject

Returns the value of attribute subcommand.



763
764
765
# File 'lib/optimist_xl.rb', line 763

def subcommand
  @subcommand
end

#subcommand_optionsObject

Returns the value of attribute subcommand_options.



763
764
765
# File 'lib/optimist_xl.rb', line 763

def subcommand_options
  @subcommand_options
end