Module: BooleanCombinator

Included in:
AndCombinator, OrCombinator
Defined in:
lib/json_expr/operators/boolean_combinator.rb

Instance Method Summary collapse

Instance Method Details

#combine(evaluator, args) ⇒ Object

This method is abstract.

method

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/json_expr/operators/boolean_combinator.rb', line 12

def combine(evaluator, args)
  raise NotImplementedError.new("You must implement combine method.")
end

#evaluate(evaluator, args) ⇒ Object



4
5
6
7
8
9
# File 'lib/json_expr/operators/boolean_combinator.rb', line 4

def evaluate(evaluator, args)
  if args.is_a? Array
    return combine(evaluator, args)
  end
  nil
end