Class: BinaryNode
- Inherits:
-
Object
- Object
- BinaryNode
- Defined in:
- lib/ast.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.
Instance Method Summary collapse
-
#initialize(left, right) ⇒ BinaryNode
constructor
A new instance of BinaryNode.
Constructor Details
#initialize(left, right) ⇒ BinaryNode
Returns a new instance of BinaryNode.
6 7 8 9 |
# File 'lib/ast.rb', line 6 def initialize(left,right) @left = left @right = right end |
Instance Attribute Details
#left ⇒ Object (readonly)
Returns the value of attribute left.
4 5 6 |
# File 'lib/ast.rb', line 4 def left @left end |
#right ⇒ Object (readonly)
Returns the value of attribute right.
4 5 6 |
# File 'lib/ast.rb', line 4 def right @right end |