Class: Representable::Hash::CollectionBinding
- Inherits:
-
PropertyBinding
- Object
- Binding
- PropertyBinding
- Representable::Hash::CollectionBinding
- Defined in:
- lib/representable/bindings/hash_bindings.rb
Instance Attribute Summary
Attributes inherited from Binding
Instance Method Summary collapse
Methods inherited from PropertyBinding
build_for, #deserialize_from, #deserialize_method, #read, #serialize_method, #write
Methods included from Binding::Object
Methods inherited from Binding
#as, build, #compile_fragment, #get, #initialize, #read_fragment, #read_fragment_for, #representer_module_for, #set, #uncompile_fragment, #write_fragment, #write_fragment_for
Constructor Details
This class inherits a constructor from Representable::Binding
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Representable::Binding
Instance Method Details
#deserialize(fragment) ⇒ Object
43 44 45 |
# File 'lib/representable/bindings/hash_bindings.rb', line 43 def deserialize(fragment) CollectionDeserializer.new(self).deserialize(fragment) end |
#serialize(value) ⇒ Object
39 40 41 |
# File 'lib/representable/bindings/hash_bindings.rb', line 39 def serialize(value) value.collect { |item| super(item) } # TODO: i don't want Array but Forms here - what now? end |