Class: Predicator::AST::Binary

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

Direct Known Subclasses

And, Equal, GreaterThan, In, LessThan, NotIn, Or

Instance Attribute Summary collapse

Attributes inherited from Node

#left

Instance Method Summary collapse

Methods inherited from Node

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

Constructor Details

#initialize(left, right) ⇒ Binary

Returns a new instance of Binary.



81
82
83
84
# File 'lib/predicator/ast.rb', line 81

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

Instance Attribute Details

#rightObject

Returns the value of attribute right.



79
80
81
# File 'lib/predicator/ast.rb', line 79

def right
  @right
end

Instance Method Details

#childrenObject



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

def children; [left, right] end