Class: Hecks::Bluebook::Expression::Evaluator::Or

Inherits:
Struct
  • Object
show all
Defined in:
lib/hecks/bluebook/expression/evaluator.rb

Overview

The boolean/comparison grammar an expression parses into. Leaf nodes (Compare/Include/Resolve) hold already-parsed Resolver ASTs, not raw strings — which branch a leaf's grammar takes is, like the boolean/ comparison grammar above it, a pure function of the string. Only the final state/attrs dictionary read, inside Resolver.interpret, varies per call. Parsing the whole tree once and caching it (ast_cache, below) is what makes that safe.

Instance Attribute Summary collapse

Instance Attribute Details

#leftObject

Returns the value of attribute left

Returns:

  • (Object)

    the current value of left



40
41
42
# File 'lib/hecks/bluebook/expression/evaluator.rb', line 40

def left
  @left
end

#rightObject

Returns the value of attribute right

Returns:

  • (Object)

    the current value of right



40
41
42
# File 'lib/hecks/bluebook/expression/evaluator.rb', line 40

def right
  @right
end