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 Method Summary collapse
-
#deserialize_from(node) ⇒ Object
FIXME: this is not tested!.
-
#write(parent, value, as) ⇒ Object
DISCUSS: use AttributeBinding here?.
Methods inherited from Collection
Methods included from Binding::Collection
Methods inherited from Representable::XML::Binding
build_for, #deserialize_method, #read, #serialize_for, #serialize_method, #serialize_node
Instance Method Details
#deserialize_from(node) ⇒ Object
FIXME: this is not tested!
127 128 129 |
# File 'lib/representable/xml/binding.rb', line 127 def deserialize_from(node) HashDeserializer.new(self).deserialize(node) end |
#write(parent, value, as) ⇒ Object
DISCUSS: use AttributeBinding here?
119 120 121 122 123 124 |
# File 'lib/representable/xml/binding.rb', line 119 def write(parent, value, as) # DISCUSS: is it correct overriding #write here? value.collect do |k, v| parent[k] = v.to_s end parent end |