lib/roar/representer/xml.rb in roar-0.11.15 vs lib/roar/representer/xml.rb in roar-0.11.16
- old
+ new
@@ -36,10 +36,12 @@
module ClassMethods
include Representable::XML::ClassMethods
def links_definition_options
- [:links_array, {:from => :link, :class => Feature::Hypermedia::Hyperlink, :collection => true, :extend => XML::HyperlinkRepresenter}]
+ # FIXME: this doesn't belong into the generic XML representer.
+ [:links_array, {:from => :link, :class => Feature::Hypermedia::Hyperlink, :collection => true, :extend => XML::HyperlinkRepresenter,
+ :representer_exec => true, :getter => lambda { |*| links_array }, :setter => lambda { |val,*| self.links_array=(val) } }] # TODO: merge with JSON.
end
# Generic entry-point for parsing.
def deserialize(*args)
from_xml(*args)