Class: Representable::XML::ObjectBinding

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

Overview

Represents a tag with object binding.

Instance Attribute Summary

Attributes inherited from Binding

#definition

Instance Method Summary collapse

Methods inherited from Binding

#initialize, #read

Constructor Details

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

Instance Method Details

#write(xml, value) ⇒ Object

Adds the ref’s markup to xml.



74
75
76
77
78
79
80
# File 'lib/representable/bindings/xml_bindings.rb', line 74

def write(xml, value)
  if definition.array?
    write_collection(xml, value)
  else
    write_entity(xml, value)
  end
end