Class: Arrow::Slicer::InCondition

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

Instance Method Summary collapse

Methods inherited from Condition

#&, #^, #|

Constructor Details

#initialize(column, values) ⇒ InCondition

Returns a new instance of InCondition.



315
316
317
318
# File 'lib/arrow/slicer.rb', line 315

def initialize(column, values)
  @column = column
  @values = values
end

Instance Method Details

#!@Object



320
321
322
# File 'lib/arrow/slicer.rb', line 320

def !@
  NotInCondition.new(@column, @values)
end

#evaluateObject



324
325
326
327
328
329
# File 'lib/arrow/slicer.rb', line 324

def evaluate
  values = @values
  values = Array.new(values) unless values.is_a?(Array)
  options = SetLookupOptions.new(values)
  Function.find("is_in").execute([@column.data], options).value
end