Class: Chicago::Database::ComparisonFilter Private

Inherits:
Filter
  • Object
show all
Defined in:
lib/chicago/database/filter.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary

Attributes inherited from Filter

#column, #value

Instance Method Summary collapse

Methods inherited from Filter

#filter_dataset, from_hash

Constructor Details

#initialize(column, value, comparison) ⇒ ComparisonFilter

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ComparisonFilter.



69
70
71
72
# File 'lib/chicago/database/filter.rb', line 69

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

Instance Method Details

#to_sequelObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



74
75
76
# File 'lib/chicago/database/filter.rb', line 74

def to_sequel
  @column.select_name.send(@comparison, @value)
end