Class: Command::RootCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/command-set/command-set.rb

Instance Attribute Summary

Attributes inherited from Command

#arg_hash

Attributes included from CommandClassMethods

#advice_block, #argument_list, #parent_arguments, #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, #optional_arguments, #parent, #required_arguments, setup, short_docs, #subject_requirements, #undoable?, #validate_arguments, #verify_subject, 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?, #factory, #optional_argument

Methods included from Common

#add_requirements, #completion_list, #find_command, #path, #process_terms

Methods included from DSL::Action

#chain, #chain_first, #defer, #dont_undo, #interruptable, #pause, #subject, #task, #undo

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

.single_consume(argument, arg_hash, subject, terms) ⇒ Object



136
137
138
139
140
141
# File 'lib/command-set/command-set.rb', line 136

def single_consume(argument, arg_hash, subject, terms)
  if not argument.required? and parent.command_names.include?(terms.first)
    raise OutOfArgumentsException, "next is a command name"
  end
  super
end