Module: Humanoid::Extensions::Object::Conversions::ClassMethods
- Defined in:
- lib/humanoid/extensions/object/conversions.rb
Instance Method Summary collapse
Instance Method Details
#get(value) ⇒ Object
26 27 28 |
# File 'lib/humanoid/extensions/object/conversions.rb', line 26 def get(value) self.new(value) end |
#set(value) ⇒ Object
22 23 24 |
# File 'lib/humanoid/extensions/object/conversions.rb', line 22 def set(value) value.respond_to?(:attributes) ? value.attributes : value end |