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.
6 7 8 9 |
# File 'lib/choosy/command.rb', line 6 def initialize(name, supercommand=nil) super(name) self.parent = supercommand end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
3 4 5 |
# File 'lib/choosy/command.rb', line 3 def arguments @arguments end |
#executor ⇒ Object
Returns the value of attribute executor.
3 4 5 |
# File 'lib/choosy/command.rb', line 3 def executor @executor end |
#parent ⇒ Object
Returns the value of attribute parent.
4 5 6 |
# File 'lib/choosy/command.rb', line 4 def parent @parent end |
Instance Method Details
#subcommand? ⇒ Boolean
17 18 19 |
# File 'lib/choosy/command.rb', line 17 def subcommand? !@parent.nil? end |