Class: Predicator::AST::Binary

Inherits:
Node
  • Object
show all
Defined in:
lib/predicator/ast.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#left

Instance Method Summary collapse

Methods inherited from Node

#each, #literal?, #to_dot, #to_instructions, #to_s, #type, #variable?

Constructor Details

#initialize(left, right) ⇒ Binary

Returns a new instance of Binary.



89
90
91
92
# File 'lib/predicator/ast.rb', line 89

def initialize left, right
  super left
  @right = right
end

Instance Attribute Details

#rightObject

Returns the value of attribute right.



87
88
89
# File 'lib/predicator/ast.rb', line 87

def right
  @right
end

Instance Method Details

#childrenObject



94
# File 'lib/predicator/ast.rb', line 94

def children; [left, right] end