Class: RESO::API::WhereChain
- Inherits:
-
Object
- Object
- RESO::API::WhereChain
- Defined in:
- lib/reso_api/app/models/reso/api/where_chain.rb
Instance Method Summary collapse
-
#initialize(query_builder) ⇒ WhereChain
constructor
A new instance of WhereChain.
- #not(conditions) ⇒ Object
Constructor Details
#initialize(query_builder) ⇒ WhereChain
4 5 6 |
# File 'lib/reso_api/app/models/reso/api/where_chain.rb', line 4 def initialize(query_builder) @query_builder = query_builder end |
Instance Method Details
#not(conditions) ⇒ Object
8 9 10 11 12 |
# File 'lib/reso_api/app/models/reso/api/where_chain.rb', line 8 def not(conditions) fragments = QueryConditions.parse(conditions, negate: true) fragments.each { |f| @query_builder.add_condition(f) } @query_builder end |