Class: Representable::XML::Binding::AttributeHash
- Inherits:
-
Collection
- Object
- Binding
- Representable::XML::Binding
- Collection
- Representable::XML::Binding::AttributeHash
- Defined in:
- lib/representable/xml/binding.rb
Instance Attribute Summary
Attributes inherited from Binding
#array, #cached_representer, #getter, #has_default, #name, #representable, #represented, #setter, #skip_filters, #typed, #user_options
Instance Method Summary collapse
-
#deserialize_from(node) ⇒ Object
FIXME: this is not tested!.
-
#write(parent, value) ⇒ Object
DISCUSS: use AttributeBinding here?.
Methods inherited from Collection
Methods inherited from Representable::XML::Binding
build_for, #deserialize_method, #read, #serialize_for, #serialize_method, #serialize_node
Methods inherited from Binding
#[], #as, build, #compile_fragment, #default_for, #evaluate_option, #get, #initialize, #parse_filter, #read_fragment, #render_filter, #render_fragment, #representer_module_for, #set, #skipable_empty_value?, #uncompile_fragment, #update!, #write_fragment
Methods included from Binding::Factories
#deserializer, #deserializer_class, #populator, #populator_class, #serializer, #serializer_class
Constructor Details
This class inherits a constructor from Representable::Binding
Instance Method Details
#deserialize_from(node) ⇒ Object
FIXME: this is not tested!
134 135 136 |
# File 'lib/representable/xml/binding.rb', line 134 def deserialize_from(node) HashDeserializer.new(self).deserialize(node) end |
#write(parent, value) ⇒ Object
DISCUSS: use AttributeBinding here?
126 127 128 129 130 131 |
# File 'lib/representable/xml/binding.rb', line 126 def write(parent, value) # DISCUSS: is it correct overriding #write here? value.collect do |k, v| parent[k] = v.to_s end parent end |