Class: Brita::WhereHandler
- Inherits:
-
Object
- Object
- Brita::WhereHandler
- Defined in:
- lib/brita/where_handler.rb
Instance Method Summary collapse
- #call(collection, value, _params, _scope_params) ⇒ Object
-
#initialize(param) ⇒ WhereHandler
constructor
A new instance of WhereHandler.
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 |