lib/nanoc/helpers/xml_sitemap.rb in nanoc-3.6.7 vs lib/nanoc/helpers/xml_sitemap.rb in nanoc-3.6.8

- old
+ new

@@ -37,11 +37,11 @@ # # @option params [Proc] :rep_select A proc to filter reps through. If the # proc returns true, the rep will be included; otherwise, it will not. # # @return [String] The XML sitemap - def xml_sitemap(params={}) + def xml_sitemap(params = {}) require 'builder' # Extract parameters items = params.fetch(:items) { @items.reject { |i| i[:is_hidden] } } select_proc = params.fetch(:rep_select, nil) @@ -50,10 +50,10 @@ buffer = '' xml = Builder::XmlMarkup.new(:target => buffer, :indent => 2) # Check for required attributes if @site.config[:base_url].nil? - raise RuntimeError.new("The Nanoc::Helpers::XMLSitemap helper requires the site configuration to specify the base URL for the site.") + raise RuntimeError.new('The Nanoc::Helpers::XMLSitemap helper requires the site configuration to specify the base URL for the site.') end # Build sitemap xml.instruct! xml.urlset(:xmlns => 'http://www.sitemaps.org/schemas/sitemap/0.9') do