Class: Journey::Nodes::Binary
Direct Known Subclasses
Instance Attribute Summary collapse
-
#right ⇒ Object
Returns the value of attribute right.
Attributes inherited from Node
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(left, right) ⇒ Binary
constructor
A new instance of Binary.
Methods inherited from Node
#each, #name, #to_dot, #to_s, #to_sym, #type
Constructor Details
#initialize(left, right) ⇒ Binary
Returns a new instance of Binary.
82 83 84 85 |
# File 'lib/journey/nodes/node.rb', line 82 def initialize left, right super(left) @right = right end |
Instance Attribute Details
#right ⇒ Object
Returns the value of attribute right.
80 81 82 |
# File 'lib/journey/nodes/node.rb', line 80 def right @right end |
Instance Method Details
#children ⇒ Object
87 |
# File 'lib/journey/nodes/node.rb', line 87 def children; [left, right] end |