Class: Brita::WhereHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/brita/where_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(param) ⇒ WhereHandler

Returns a new instance of WhereHandler.



3
4
5
# File 'lib/brita/where_handler.rb', line 3

def initialize(param)
  @param = param
end

Instance Method Details

#call(collection, value, _params, _scope_params) ⇒ Object



7
8
9
# File 'lib/brita/where_handler.rb', line 7

def call(collection, value, _params, _scope_params)
  collection.where(@param.internal_name => value)
end