Class: Stretchy::Filters::AndFilter
- Defined in:
- lib/stretchy/filters/and_filter.rb
Constant Summary
Constants included from Utils::Contract
Utils::Contract::ASSERTIONS, Utils::Contract::DECAY_FUNCTIONS, Utils::Contract::DISTANCE_FORMAT
Instance Method Summary collapse
-
#initialize(*args) ⇒ AndFilter
constructor
A new instance of AndFilter.
- #to_search ⇒ Object
Methods included from Utils::Contract
included, #require_one, #validate!
Constructor Details
#initialize(*args) ⇒ AndFilter
Returns a new instance of AndFilter.
9 10 11 12 |
# File 'lib/stretchy/filters/and_filter.rb', line 9 def initialize(*args) @filters = args.flatten validate! end |
Instance Method Details
#to_search ⇒ Object
14 15 16 17 18 |
# File 'lib/stretchy/filters/and_filter.rb', line 14 def to_search { and: @filters.map(&:to_search) } end |