Class: Dentaku::AST::Equal

Inherits:
Comparator show all
Defined in:
lib/dentaku/ast/comparators.rb

Instance Attribute Summary

Attributes inherited from Operation

#left, #right

Instance Method Summary collapse

Methods inherited from Comparator

precedence, #type

Methods inherited from Operation

#dependencies, #initialize, right_associative?

Methods inherited from Node

arity, #dependencies, peek, precedence

Constructor Details

This class inherits a constructor from Dentaku::AST::Operation

Instance Method Details

#operatorObject



74
75
76
# File 'lib/dentaku/ast/comparators.rb', line 74

def operator
  return :==
end

#value(context = {}) ⇒ Object



70
71
72
# File 'lib/dentaku/ast/comparators.rb', line 70

def value(context = {})
  left.value(context) == right.value(context)
end