class Mongoid::Contextual::None
def ==(other)
- Since: - 4.0.0
Returns:
-
(true, false)- If the objects are equal.
Parameters:
-
other(Array) -- The other array.
Other tags:
- Example: Check equality. -
def ==(other) other.is_a?(None) end
def distinct(field)
-
(Array)- Empty Array
Parameters:
-
field(String, Symbol) -- the name of the field.
Other tags:
- Example: Get the distinct values. -
def distinct(field) [] end
def each
- Since: - 4.0.0
Returns:
-
(Enumerator)- The enumerator.
Other tags:
- Example: Iterate over the context. -
def each if block_given? [].each { |doc| yield(doc) } self else to_enum end end
def exists?; false; end
- Since: - 4.0.0
Returns:
-
(true, false)- If the count is more than zero.
Other tags:
- Example: Do any documents exist for the context. -
def exists?; false; end
def initialize(criteria)
- Since: - 4.0.0
Parameters:
-
criteria(Criteria) -- The criteria.
Other tags:
- Example: Create the new context. -
def initialize(criteria) @criteria, @klass = criteria, criteria.klass end
def last; nil; end
- Since: - 4.0.0
Returns:
-
(nil)- Always nil.
Other tags:
- Example: Get the last document. -
def last; nil; end
def length
- Since: - 4.0.0
Returns:
-
(Integer)- Always zero.
Other tags:
- Example: Get the length of matching documents. -
def length entries.length end
def pluck(*args)
-
(Array)- Emtpy Array
Parameters:
-
args(String, Symbol, Array) -- Field or fields to pluck.
Other tags:
- Example: Allow pluck for null context. -
def pluck(*args) [] end