Module: Mongoid::Extensions::TrueClass
- Defined in:
- lib/mongoid/extensions/true_class.rb
Instance Method Summary collapse
-
#__sortable__ ⇒ Integer
Get the value of the object as a mongo friendy sort value.
-
#is_a?(other) ⇒ true, false
Is the passed value a boolean?.
Instance Method Details
#__sortable__ ⇒ Integer
Get the value of the object as a mongo friendy sort value.
14 15 16 |
# File 'lib/mongoid/extensions/true_class.rb', line 14 def __sortable__ 1 end |
#is_a?(other) ⇒ true, false
Is the passed value a boolean?
28 29 30 31 32 33 |
# File 'lib/mongoid/extensions/true_class.rb', line 28 def is_a?(other) if other == ::Boolean || other.class == ::Boolean return true end super(other) end |