Class: MundaneSearch::Filters::ExactMatch
- Defined in:
- lib/mundane-search/filters/exact_match.rb
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
3 4 5 6 7 8 9 |
# File 'lib/mundane-search/filters/exact_match.rb', line 3 def filtered_collection if apply? collection.select {|e| e == match_value } else collection end end |