Class: Dentaku::AST::Operation
- Defined in:
- lib/dentaku/ast/operation.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#right ⇒ Object
readonly
Returns the value of attribute right.
Class Method Summary collapse
Instance Method Summary collapse
- #dependencies(context = {}) ⇒ Object
-
#initialize(left, right) ⇒ Operation
constructor
A new instance of Operation.
Methods inherited from Node
Constructor Details
#initialize(left, right) ⇒ Operation
Returns a new instance of Operation.
8 9 10 11 |
# File 'lib/dentaku/ast/operation.rb', line 8 def initialize(left, right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
6 7 8 |
# File 'lib/dentaku/ast/operation.rb', line 6 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
6 7 8 |
# File 'lib/dentaku/ast/operation.rb', line 6 def right @right end |
Class Method Details
.right_associative? ⇒ Boolean
17 18 19 |
# File 'lib/dentaku/ast/operation.rb', line 17 def self.right_associative? false end |
Instance Method Details
#dependencies(context = {}) ⇒ Object
13 14 15 |
# File 'lib/dentaku/ast/operation.rb', line 13 def dependencies(context={}) (left.dependencies(context) + right.dependencies(context)).uniq end |