Module: Mongoid::Extensions::Symbol::Conversions::ClassMethods
- Defined in:
- lib/mongoid/extensions/symbol/conversions.rb
Instance Method Summary collapse
Instance Method Details
#get(value) ⇒ Object
14 15 16 |
# File 'lib/mongoid/extensions/symbol/conversions.rb', line 14 def get(value) value end |
#set(value) ⇒ Object
10 11 12 |
# File 'lib/mongoid/extensions/symbol/conversions.rb', line 10 def set(value) (value.nil? or (value.respond_to?(:empty?) && value.empty?)) ? nil : value.to_sym end |