class Representable::XML::Binding::Attribute

Represents a tag attribute. Currently this only works on the top-level tag.

Public Instance Methods

read(node) click to toggle source
# File lib/representable/xml/binding.rb, line 142
def read(node)
  node[as]
end
serialize_for(value, parent) click to toggle source
# File lib/representable/xml/binding.rb, line 146
def serialize_for(value, parent)
  parent[as] = value.to_s
end
write(parent, value) click to toggle source
# File lib/representable/xml/binding.rb, line 150
def write(parent, value)
  serialize_for(value, parent)
end