Module: Representable::XML
- Defined in:
- lib/representable/xml.rb,
lib/representable/bindings/xml_bindings.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Classes: AttributeBinding, Binding, Definition, NamespaceBinding, ObjectBinding, TextBinding
Constant Summary
collapse
- BINDING_FOR_TYPE =
{
:attr => AttributeBinding,
:text => TextBinding,
:namespace=> NamespaceBinding,
}
Class Method Summary
collapse
Class Method Details
.binding_for_definition(definition) ⇒ Object
12
13
14
|
# File 'lib/representable/xml.rb', line 12
def self.binding_for_definition(definition)
(BINDING_FOR_TYPE[definition.sought_type] or ObjectBinding).new(definition)
end
|