Class: MundaneSearch::Filters::AttributeSubstring
- Defined in:
- lib/mundane-search/filters/attribute_substring.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/attribute_substring.rb', line 9 def filtered_collection collection.select {|e| e.send(target).index(match_value) } end |