Sha256: 2fde9803bebc44789c2d6b749cf77fabb8dc936bcbfba1fbb5808a3f02d23a89
Contents?: true
Size: 894 Bytes
Versions: 13
Compression:
Stored size: 894 Bytes
Contents
module Sufia module ResourceSync class CapabilityListWriter attr_reader :resource_list_url, :description_url def initialize(resource_list_url:, description_url:) @resource_list_url = resource_list_url @description_url = description_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: description_url) xml['rs'].md(capability: "capabilitylist") xml.url do xml.loc resource_list_url xml['rs'].md(capability: 'resourcelist') end end end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems