Method: Representable::XML::AttributeHashBinding#write

Defined in:
lib/representable/bindings/xml_bindings.rb

#write(parent, value) ⇒ Object

DISCUSS: use AttributeBinding here?



126
127
128
129
130
131
# File 'lib/representable/bindings/xml_bindings.rb', line 126

def write(parent, value)  # DISCUSS: is it correct overriding #write here?
  value.collect do |k, v|
    parent[k] = serialize(v.to_s)
  end
  parent
end