Module: Mongoid::Contextual::Queryable
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/mongoid/contextual/queryable.rb |
Overview
Mixin module which adds methods to ::Mongoid::Criteria
that indicate the criteria query result will be an empty set.
Instance Attribute Summary
-
#blank? ⇒ true | false
(also: #empty?)
readonly
Is the enumerable of matching documents empty?
- #collection readonly
- #collection The collection to query against.(The collection to query against.) readonly
- #criteria readonly
- #criteria The criteria for the context.(The criteria for the context.) readonly
-
#empty?
readonly
Alias for #blank?.
- #klass readonly
- #klass The klass for the criteria.(The klass for the criteria.) readonly
Instance Attribute Details
#blank? ⇒ true
| false
(readonly)
Also known as: #empty?
Is the enumerable of matching documents empty?
# File 'lib/mongoid/contextual/queryable.rb', line 22
def blank? !exists? end
#collection (readonly)
[ GitHub ]#collection The collection to query against.(The collection to query against.) (readonly)
[ GitHub ]# File 'lib/mongoid/contextual/queryable.rb', line 14
attr_reader :collection, :criteria, :klass
#criteria (readonly)
[ GitHub ]# File 'lib/mongoid/contextual/queryable.rb', line 14
attr_reader :collection, :criteria, :klass
#criteria The criteria for the context.(The criteria for the context.) (readonly)
[ GitHub ]# File 'lib/mongoid/contextual/queryable.rb', line 14
attr_reader :collection, :criteria, :klass
#empty? (readonly)
Alias for #blank?.
# File 'lib/mongoid/contextual/queryable.rb', line 25
alias :empty? :blank?
#klass (readonly)
[ GitHub ]# File 'lib/mongoid/contextual/queryable.rb', line 14
attr_reader :collection, :criteria, :klass
#klass The klass for the criteria.(The klass for the criteria.) (readonly)
[ GitHub ]# File 'lib/mongoid/contextual/queryable.rb', line 14
attr_reader :collection, :criteria, :klass