Class: Arrow::Slicer::NotInCondition
- Defined in:
- lib/arrow/slicer.rb
Instance Method Summary collapse
- #!@ ⇒ Object
- #evaluate ⇒ Object
-
#initialize(column, values) ⇒ NotInCondition
constructor
A new instance of NotInCondition.
Methods inherited from Condition
Constructor Details
#initialize(column, values) ⇒ NotInCondition
Returns a new instance of NotInCondition.
391 392 393 394 |
# File 'lib/arrow/slicer.rb', line 391 def initialize(column, values) @column = column @values = values end |
Instance Method Details
#!@ ⇒ Object
396 397 398 |
# File 'lib/arrow/slicer.rb', line 396 def !@ InCondition.new(@column, @values) end |
#evaluate ⇒ Object
400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/arrow/slicer.rb', line 400 def evaluate values_index = {} @values.each do |value| values_index[value] = true end raw_array = @column.collect do |value| if value.nil? nil else not values_index.key?(value) end end BooleanArray.new(raw_array) end |