Class: Representable::XML::Binding::Attribute
Overview
Represents a tag attribute. Currently this only works on the top-level tag.
Instance Method Summary
collapse
build_for, #deserialize_from, #deserialize_method, #serialize_method, #serialize_node
Instance Method Details
#read(node, as) ⇒ Object
135
136
137
|
# File 'lib/representable/xml/binding.rb', line 135
def read(node, as)
node[as]
end
|
#serialize_for(value, parent, as) ⇒ Object
139
140
141
|
# File 'lib/representable/xml/binding.rb', line 139
def serialize_for(value, parent, as)
parent[as] = value.to_s
end
|
#write(parent, value, as) ⇒ Object
143
144
145
|
# File 'lib/representable/xml/binding.rb', line 143
def write(parent, value, as)
serialize_for(value, parent, as)
end
|