Sha256: 360b363bb2ca646be64f541331fb68573a9ddca1940bf90e5310ca0c6b301eb7
Contents?: true
Size: 880 Bytes
Versions: 13
Compression:
Stored size: 880 Bytes
Contents
module Sufia module ResourceSync class SourceDescriptionWriter attr_reader :capability_list_url def initialize(capability_list_url: 'http://example.com/dataset1/capabilitylist.xml') @capability_list_url = capability_list_url end def write builder.to_xml end private def builder Nokogiri::XML::Builder.new do |xml| xml.urlset('xmlns' => 'http://www.sitemaps.org/schemas/sitemap/0.9', 'xmlns:rs' => 'http://www.openarchives.org/rs/terms/') do xml['rs'].ln(rel: "up", href: capability_list_url) xml['rs'].md(capability: "description") xml.url do xml.loc capability_list_url xml['rs'].md(capability: 'capabilitylist') end end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems