Sha256: b8cb07fea82ea6f551398b6e803e1b15466aa74d0d960aca56523058ca6ab94f
Contents?: true
Size: 555 Bytes
Versions: 2
Compression:
Stored size: 555 Bytes
Contents
module Almodovar module ArrayToXml def to_xml_with_links(options = {}, &block) return to_xml_without_links(options, &block) unless options[:convert_links] options[:builder].tag!(:link, :rel => options[:root]) do |xml| to_xml_without_links options.merge(:builder => xml), &block end end end class Resource def to_xml(options = {}) options[:builder].tag!(:link, :rel => options[:root], :href => url) end end end class Array include Almodovar::ArrayToXml alias_method_chain :to_xml, :links end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
almodovar-0.6.2 | lib/almodovar/to_xml.rb |
almodovar-0.6.1 | lib/almodovar/to_xml.rb |