Module: Mongoid::Extensions::Range
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Defined in: | lib/mongoid/extensions/range.rb |
Overview
Adds type-casting behavior to Range
class.
Class Method Summary
Instance Attribute Summary
-
#resizable? ⇒ true
readonly
Is this a resizable object.
Instance Method Summary
- #__find_args__ ⇒ Array deprecated Deprecated.
-
#mongoize ⇒ Hash | nil
Turn the object from the ruby type we deal with to a Mongo friendly type.
Class Method Details
.included(base)
[ GitHub ]# File 'lib/mongoid/extensions/range.rb', line 8
def self.included(base) base.extend(ClassMethods) end
Instance Attribute Details
#resizable? ⇒ true
(readonly)
Is this a resizable object.
# File 'lib/mongoid/extensions/range.rb', line 41
def resizable? true end
Instance Method Details
#__find_args__ ⇒ Array
Deprecated.
Get the range as arguments for a find.
# File 'lib/mongoid/extensions/range.rb', line 19
def __find_args__ to_a end
#mongoize ⇒ Hash | nil
Turn the object from the ruby type we deal with to a Mongo friendly type.
# File 'lib/mongoid/extensions/range.rb', line 31
def mongoize ::Range.mongoize(self) end