Class: Praxis::Extensions::AttributeFiltering::FilteringParams::DSLCompiler
- Inherits:
-
Attributor::DSLCompiler
- Object
- Attributor::DSLCompiler
- Praxis::Extensions::AttributeFiltering::FilteringParams::DSLCompiler
- Defined in:
- lib/praxis/extensions/attribute_filtering/filtering_params.rb
Instance Method Summary collapse
- #any(name, using: nil, fuzzy: false) ⇒ Object
-
#filter(name, using: nil, fuzzy: false) ⇒ Object
“account.id”: { operators: [“=”, “!=”] }, name: { operators: [“=”, “!=”], fuzzy_match: true }, start_date: { operators: [“!=”, “>=”, “<=”, “=”, “<”, “>”] }.
Instance Method Details
#any(name, using: nil, fuzzy: false) ⇒ Object
44 45 46 |
# File 'lib/praxis/extensions/attribute_filtering/filtering_params.rb', line 44 def any(name, using: nil, fuzzy: false) target.add_any(name.to_sym, operators: Set.new(using), fuzzy: fuzzy) end |
#filter(name, using: nil, fuzzy: false) ⇒ Object
“account.id”: { operators: [“=”, “!=”] }, name: { operators: [“=”, “!=”], fuzzy_match: true }, start_date: { operators: [“!=”, “>=”, “<=”, “=”, “<”, “>”] }
40 41 42 |
# File 'lib/praxis/extensions/attribute_filtering/filtering_params.rb', line 40 def filter(name, using: nil, fuzzy: false) target.add_filter(name.to_sym, operators: Set.new(using), fuzzy: fuzzy) end |