Class: ActiveMocker::Collection::Queries::WhereNotChain
- Inherits:
-
Object
- Object
- ActiveMocker::Collection::Queries::WhereNotChain
- Defined in:
- lib/active_mocker/collection/queries.rb
Instance Method Summary collapse
-
#initialize(collection) ⇒ WhereNotChain
constructor
A new instance of WhereNotChain.
- #not(options = {}) ⇒ Object
Constructor Details
#initialize(collection) ⇒ WhereNotChain
Returns a new instance of WhereNotChain.
30 31 32 |
# File 'lib/active_mocker/collection/queries.rb', line 30 def initialize(collection) @collection = collection end |
Instance Method Details
#not(options = {}) ⇒ Object
34 35 36 37 38 |
# File 'lib/active_mocker/collection/queries.rb', line 34 def not(={}) @collection.reject do |record| .all? { |col, match| record.send(col) == match } end end |