Class: Command::RootCommand
- Defined in:
- lib/command-set/command-set.rb
Instance Attribute Summary
Attributes inherited from Command
Attributes included from CommandClassMethods
#advice_block, #argument_list, #context, #subject_requirements
Class Method Summary collapse
Methods inherited from Command
#advise_formatter, #all_arguments, #consume_hash, create_argument_methods, defined?, documentation, each_command, #go, inherited, #initialize, initialize_copy, inspect, #inspect, #join_undo, #name, #parent, parent_argument_list, push_context, #required_arguments, #resolve_parent_arguments, short_docs, #subject_requirements, #undoable?, #validate_arguments, #verify_image, visit
Methods included from DSL::CommandDefinition
#action, #document, #doesnt_undo, #format_advice, #parent_argument, #parent_arguments, #subject_methods, #undo
Methods included from DSL::Argument
#alternating_argument, #argument, argument_typemap, #create, #create_decorator, document, #named_optionals, register_argument, register_decorator, #special_argument, #subject
Methods included from CommandClassMethods
#consume_terms, #embed_argument, #executeable?, #optional_argument
Methods included from Common
#add_requirements, #completion_list, #find_command, #path, #process_terms
Methods included from DSL::Action
#action_thread, #chain, #chain_first, #defer, #dont_undo, #fan_out, #pause, #root, #subject, #task, #undo, #up
Methods included from DSL::Formatting
#begin_list, #end_list, #item, #list, #sub_collector
Constructor Details
This class inherits a constructor from Command::Command
Class Method Details
.setup(host, name) ⇒ Object
136 137 138 139 140 |
# File 'lib/command-set/command-set.rb', line 136 def setup(host, name) klass = super(name) klass.instance_variable_set("@host", host) return klass end |
.single_consume(argument, arg_hash, subject, terms) ⇒ Object
142 143 144 145 146 147 |
# File 'lib/command-set/command-set.rb', line 142 def single_consume(argument, arg_hash, subject, terms) if not argument.required? and @host.command_names.include?(terms.first) raise OutOfArgumentsException, "next is a command name" end super end |