Module: Mongoid::Extensions::Range::Conversions::ClassMethods
- Defined in:
- lib/mongoid/extensions/range/conversions.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#get(value) ⇒ Object
14 15 16 |
# File 'lib/mongoid/extensions/range/conversions.rb', line 14 def get(value) value.nil? ? nil : ::Range.new(value["min"], value["max"]) end |
#set(value) ⇒ Object
18 19 20 |
# File 'lib/mongoid/extensions/range/conversions.rb', line 18 def set(value) value.nil? ? nil : value.to_hash end |