Sha256: 00a6743b81b3c15f586e71acb1c542b8752e35f3820718d44c5ebbea4d4dd998
Contents?: true
Size: 1001 Bytes
Versions: 12
Compression:
Stored size: 1001 Bytes
Contents
require_relative './operation' module Dentaku module AST class Comparator < Operation def self.precedence 5 end def type :logical end end class LessThan < Comparator def value(context={}) left.value(context) < right.value(context) end end class LessThanOrEqual < Comparator def value(context={}) left.value(context) <= right.value(context) end end class GreaterThan < Comparator def value(context={}) left.value(context) > right.value(context) end end class GreaterThanOrEqual < Comparator def value(context={}) left.value(context) >= right.value(context) end end class NotEqual < Comparator def value(context={}) left.value(context) != right.value(context) end end class Equal < Comparator def value(context={}) left.value(context) == right.value(context) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems