Module: Mongoid::Extensions::BigDecimal
- Defined in:
- lib/mongoid/extensions/big_decimal.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#__to_inc__ ⇒ Float
Convert the big decimal to an $inc-able value.
-
#mongoize ⇒ Object
Turn the object from the ruby type we deal with to a Mongo friendly type.
-
#numeric? ⇒ true
Is the BigDecimal a number?.
Instance Method Details
#__to_inc__ ⇒ Float
Convert the big decimal to an $inc-able value.
13 14 15 |
# File 'lib/mongoid/extensions/big_decimal.rb', line 13 def __to_inc__ to_f end |
#mongoize ⇒ Object
Turn the object from the ruby type we deal with to a Mongo friendly type.
24 25 26 |
# File 'lib/mongoid/extensions/big_decimal.rb', line 24 def mongoize to_s end |
#numeric? ⇒ true
Is the BigDecimal a number?
34 35 36 |
# File 'lib/mongoid/extensions/big_decimal.rb', line 34 def numeric? true end |