Class: Command::AnchoredCommandSetup

Inherits:
CommandSetup show all
Defined in:
lib/command-set/command.rb

Instance Attribute Summary collapse

Attributes inherited from CommandSetup

#arg_hash, #command_class, #set_nesting, #subject, #task_id, #terms

Attributes inherited from SetVisitor

#command_path, #subject_context

Instance Method Summary collapse

Methods inherited from CommandSetup

#arrive_at, #command_instance, #leave_from, #resolve_command_class, #term_without_hop

Methods inherited from SetVisitor

#arrive_at, #command_out_of_terms, #extra_terms, #leave_from, #set_out_of_terms, #term_without_hop

Constructor Details

#initialize(command_set, cmd = [], args = {}) ⇒ AnchoredCommandSetup

Returns a new instance of AnchoredCommandSetup.



37
38
39
40
# File 'lib/command-set/command.rb', line 37

def initialize(command_set, cmd = [], args = {})
  super(cmd, args)
  @anchored_at = command_set
end

Instance Attribute Details

#anchored_atObject

Returns the value of attribute anchored_at.



42
43
44
# File 'lib/command-set/command.rb', line 42

def anchored_at
  @anchored_at
end

Instance Method Details

#class_resolution(current_set) ⇒ Object



44
45
46
# File 'lib/command-set/command.rb', line 44

def class_resolution(current_set)
  @command_class = @anchored_at.find_command(@terms.dup)
end