Class: Arrow::Slicer::LogicalCondition

Inherits:
Condition
  • Object
show all
Defined in:
lib/arrow/slicer.rb

Direct Known Subclasses

AndCondition, OrCondition, XorCondition

Instance Method Summary collapse

Methods inherited from Condition

#&, #^, #|

Constructor Details

#initialize(condition1, condition2) ⇒ LogicalCondition

Returns a new instance of LogicalCondition.



78
79
80
81
# File 'lib/arrow/slicer.rb', line 78

def initialize(condition1, condition2)
  @condition1 = condition1
  @condition2 = condition2
end

Instance Method Details

#evaluateObject



83
84
85
# File 'lib/arrow/slicer.rb', line 83

def evaluate
  function.execute([@condition1.evaluate, @condition2.evaluate]).value
end