Class: Choosy::Command
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Choosy::Command
- Defined in:
- lib/choosy/command.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#executor ⇒ Object
Returns the value of attribute executor.
-
#parent ⇒ Object
Returns the value of attribute parent.
Attributes inherited from BaseCommand
#builder, #listing, #name, #option_builders, #printer, #summary
Instance Method Summary collapse
-
#initialize(name, supercommand = nil) ⇒ Command
constructor
A new instance of Command.
- #subcommand? ⇒ Boolean
Methods inherited from BaseCommand
#alter, #execute!, #finalize!, #options, #parse!
Constructor Details
#initialize(name, supercommand = nil) ⇒ Command
Returns a new instance of Command.
12 13 14 15 |
# File 'lib/choosy/command.rb', line 12 def initialize(name, supercommand=nil) super(name) self.parent = supercommand end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
9 10 11 |
# File 'lib/choosy/command.rb', line 9 def arguments @arguments end |
#executor ⇒ Object
Returns the value of attribute executor.
9 10 11 |
# File 'lib/choosy/command.rb', line 9 def executor @executor end |
#parent ⇒ Object
Returns the value of attribute parent.
10 11 12 |
# File 'lib/choosy/command.rb', line 10 def parent @parent end |
Instance Method Details
#subcommand? ⇒ Boolean
23 24 25 |
# File 'lib/choosy/command.rb', line 23 def subcommand? !@parent.nil? end |