Class: Arrow::Slicer::NotEqualCondition

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

Instance Method Summary collapse

Methods inherited from Condition

#&, #^, #|

Constructor Details

#initialize(column, value) ⇒ NotEqualCondition

Returns a new instance of NotEqualCondition.



236
237
238
239
# File 'lib/arrow/slicer.rb', line 236

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

Instance Method Details

#!@Object



241
242
243
# File 'lib/arrow/slicer.rb', line 241

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

#evaluateObject



245
246
247
248
249
250
251
# File 'lib/arrow/slicer.rb', line 245

def evaluate
  if @value.nil?
    Function.find("is_valid").execute([@column.data]).value
  else
    Function.find("not_equal").execute([@column.data, @value]).value
  end
end