Module: Card::Query::CardQuery::Conjunctions
- Included in:
- Card::Query::CardQuery
- Defined in:
- lib/card/query/card_query/conjunctions.rb
Overview
conjoining conditions
Instance Method Summary collapse
- #all(val) ⇒ Object (also: #and)
- #any(val) ⇒ Object (also: #or, #in)
- #current_conjunction ⇒ Object
- #not(val) ⇒ Object
Instance Method Details
#all(val) ⇒ Object Also known as: and
6 7 8 |
# File 'lib/card/query/card_query/conjunctions.rb', line 6 def all val conjoin val, :and end |
#any(val) ⇒ Object Also known as: or, in
11 12 13 |
# File 'lib/card/query/card_query/conjunctions.rb', line 11 def any val conjoin val, :or end |
#current_conjunction ⇒ Object
21 22 23 |
# File 'lib/card/query/card_query/conjunctions.rb', line 21 def current_conjunction @mods[:conj].blank? ? :and : @mods[:conj] end |
#not(val) ⇒ Object
17 18 19 |
# File 'lib/card/query/card_query/conjunctions.rb', line 17 def not val tie :card, val, { id: :id }, negate: true end |