Module: Goodyear::FilterMethods
- Included in:
- QueryMethods
- Defined in:
- lib/goodyear/filter_methods.rb
Instance Method Summary collapse
- #filter(name, options = {}, &block) ⇒ Object
- #has_field?(field) ⇒ Boolean
- #query_filter(name, options = {}) ⇒ Object
Instance Method Details
#filter(name, options = {}, &block) ⇒ Object
3 4 5 6 7 |
# File 'lib/goodyear/filter_methods.rb', line 3 def filter(name, = {}, &block) @_filters ||= [] @_filters << {name: name, args: , l: block} return self end |
#has_field?(field) ⇒ Boolean
9 10 11 12 |
# File 'lib/goodyear/filter_methods.rb', line 9 def has_field?(field) filter :exists, {field: field} return self end |
#query_filter(name, options = {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/goodyear/filter_methods.rb', line 14 def query_filter(name, = {}) @_query_filters ||= [] @_query_filters << {name: name, options: } self end |