Class: Representable::XML::AttributeBinding

Inherits:
Binding
  • Object
show all
Defined in:
lib/representable/bindings/xml_bindings.rb

Overview

Represents a tag attribute.

Instance Attribute Summary

Attributes inherited from Binding

#definition

Instance Method Summary collapse

Methods inherited from Binding

#initialize, #value_in

Constructor Details

This class inherits a constructor from Representable::XML::Binding

Instance Method Details

#update_xml(xml, values) ⇒ Object



47
48
49
50
51
# File 'lib/representable/bindings/xml_bindings.rb', line 47

def update_xml(xml, values)
  wrap(xml).tap do |xml|
    xml[name] = values.to_s
  end
end