Class: RCoLi::Command
- Inherits:
-
Object
- Object
- RCoLi::Command
- Includes:
- CommandContainer
- Defined in:
- lib/rcoli/model.rb
Instance Attribute Summary
Attributes included from CommandContainer
Instance Method Summary collapse
- #full_command ⇒ Object
-
#initialize(name) ⇒ Command
constructor
A new instance of Command.
Methods included from CommandContainer
#action, #command, #commands, #find_command, #flag, #get_action, #options, #parse_args, #put_default_values, #switch, #validate_options
Constructor Details
#initialize(name) ⇒ Command
Returns a new instance of Command.
172 173 174 |
# File 'lib/rcoli/model.rb', line 172 def initialize(name) @name = name end |
Instance Method Details
#full_command ⇒ Object
178 179 180 181 182 183 184 185 186 |
# File 'lib/rcoli/model.rb', line 178 def full_command command = self result = [] while(command.parent) do result << command.value_of_name command = command.parent end return result.reverse.join(' ') end |