module Mongoid::Extensions::FalseClass
Adds type-casting behavior to FalseClass
.
Public Instance Methods
__sortable__()
click to toggle source
Get the value of the object as a mongo friendly sort value.
@example Get the object as sort criteria.
object.__sortable__
@return [ Integer
] 0. @deprecated
# File lib/mongoid/extensions/false_class.rb, line 15 def __sortable__ 0 end
is_a?(other)
click to toggle source
Is the passed value a boolean?
@example Is the value a boolean type?
false.is_a?(Boolean)
@param [ Class ] other The class to check.
@return [ true | false ] If the other is a boolean.
Calls superclass method
# File lib/mongoid/extensions/false_class.rb, line 28 def is_a?(other) if other == Mongoid::Boolean || other.class == Mongoid::Boolean return true end super(other) end