class Representable::XML::Binding::Collection
Public Instance Methods
deserialize_from(nodes)
click to toggle source
# File lib/representable/xml/binding.rb, line 91 def deserialize_from(nodes) content_nodes = nodes.collect do |item| # TODO: move this to Node? content_for(item) end content_nodes end
serialize_for(value, parent, as)
click to toggle source
Calls superclass method
# File lib/representable/xml/binding.rb, line 86 def serialize_for(value, parent, as) # return NodeSet so << works. set_for(parent, value.collect { |item| super(item, parent, as) }) end
Private Instance Methods
set_for(parent, nodes)
click to toggle source
# File lib/representable/xml/binding.rb, line 100 def set_for(parent, nodes) Nokogiri::XML::NodeSet.new(parent.document, nodes) end