Class: Command::RequirementsCollector
- Inherits:
-
SetVisitor
- Object
- SetVisitor
- Command::RequirementsCollector
- Defined in:
- lib/command-set/structural.rb
Instance Attribute Summary collapse
-
#subject ⇒ Object
readonly
Returns the value of attribute subject.
Attributes inherited from SetVisitor
#command_path, #subject_context
Instance Method Summary collapse
- #arrive_at(terms, node) ⇒ Object
-
#initialize(subject) ⇒ RequirementsCollector
constructor
A new instance of RequirementsCollector.
Methods inherited from SetVisitor
#command_out_of_terms, #extra_terms, #leave_from, #set_out_of_terms, #term_without_hop
Constructor Details
#initialize(subject) ⇒ RequirementsCollector
Returns a new instance of RequirementsCollector.
33 34 35 36 |
# File 'lib/command-set/structural.rb', line 33 def initialize(subject) super() @subject = subject end |
Instance Attribute Details
#subject ⇒ Object (readonly)
Returns the value of attribute subject.
38 39 40 |
# File 'lib/command-set/structural.rb', line 38 def subject @subject end |
Instance Method Details
#arrive_at(terms, node) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/command-set/structural.rb', line 40 def arrive_at(terms, node) @subject.required_fields(node.subject_requirements.uniq, @subject_context) node.argument_list.each do |argument| @subject.required_fields(argument.subject_requirements.uniq) end end |