Class: Arrow::Slicer::LessCondition

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

Instance Method Summary collapse

Methods inherited from Condition

#&, #^, #|

Constructor Details

#initialize(column, value) ⇒ LessCondition

Returns a new instance of LessCondition.



277
278
279
280
# File 'lib/arrow/slicer.rb', line 277

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

Instance Method Details

#!@Object



282
283
284
# File 'lib/arrow/slicer.rb', line 282

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

#evaluateObject



286
287
288
289
290
291
292
293
294
295
# File 'lib/arrow/slicer.rb', line 286

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