Class: ActiveModel::Relation::WhereChain
- Inherits:
-
Object
- Object
- ActiveModel::Relation::WhereChain
- Defined in:
- lib/active_model/relation/where_chain.rb
Instance Attribute Summary collapse
-
#relation ⇒ Object
readonly
Returns the value of attribute relation.
Instance Method Summary collapse
-
#initialize(relation) ⇒ WhereChain
constructor
A new instance of WhereChain.
- #not ⇒ Object
Constructor Details
#initialize(relation) ⇒ WhereChain
Returns a new instance of WhereChain.
8 9 10 |
# File 'lib/active_model/relation/where_chain.rb', line 8 def initialize(relation) @relation = relation end |
Instance Attribute Details
#relation ⇒ Object (readonly)
Returns the value of attribute relation.
6 7 8 |
# File 'lib/active_model/relation/where_chain.rb', line 6 def relation @relation end |
Instance Method Details
#not ⇒ Object
12 13 14 15 |
# File 'lib/active_model/relation/where_chain.rb', line 12 def not(...) relation.where_clause += WhereClause.build(...).invert relation end |