module Mongoid::Extensions::TrueClass
Public Instance Methods
__sortable__()
click to toggle source
Get the value of the object as a mongo friendy sort value.
@example Get the object as sort criteria.
object.__sortable__
@return [ Integer ] 1.
@since 3.0.0
# File lib/mongoid/extensions/true_class.rb, line 13 def __sortable__ 1 end
is_a?(other)
click to toggle source
Is the passed value a boolean?
@example Is the value a boolean type?
true.is_a?(Boolean)
@param [ Class ] other The class to check.
@return [ true, false ] If the other is a boolean.
@since 1.0.0
Calls superclass method
# File lib/mongoid/extensions/true_class.rb, line 27 def is_a?(other) if other == ::Boolean || other.class == ::Boolean return true end super(other) end