Class: Arrow::Slicer::GreaterCondition

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

Instance Method Summary collapse

Methods inherited from Condition

#&, #^, #|

Constructor Details

#initialize(column, value) ⇒ GreaterCondition

Returns a new instance of GreaterCondition.



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

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

Instance Method Details

#!@Object



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

def !@
  LessEqualCondition.new(@column, @value)
end

#evaluateObject



330
331
332
333
334
335
336
337
338
339
# File 'lib/arrow/slicer.rb', line 330

def evaluate
  raw_array = @column.collect do |value|
    if value.nil?
      nil
    else
      @value < value
    end
  end
  BooleanArray.new(raw_array)
end