Class: MundaneSearch::Filters::Operator
- Defined in:
- lib/mundane-search/filters/operator.rb
Direct Known Subclasses
Defined Under Namespace
Classes: ActiveRecord
Instance Attribute Summary
Attributes inherited from Base
#collection, #options, #params
Instance Method Summary collapse
Methods inherited from Typical
#apply?, #key, key_type, #key_type, key_types, #match_value, #optional?, #target
Methods inherited from Base
#apply?, #call, #filtered_params, #initialize
Constructor Details
This class inherits a constructor from MundaneSearch::Filters::Base
Instance Method Details
#filtered_collection ⇒ Object
9 10 11 |
# File 'lib/mundane-search/filters/operator.rb', line 9 def filtered_collection collection.select {|e| e.send(target).send(operator, match_value) } end |
#operator ⇒ Object
13 14 15 |
# File 'lib/mundane-search/filters/operator.rb', line 13 def operator [:operator] end |