class SitemapGenerator::SitemapIndexLocation
Public Class Methods
new(opts={})
click to toggle source
Calls superclass method
SitemapGenerator::SitemapLocation::new
# File lib/sitemap_generator/sitemap_location.rb, line 168 def initialize(opts={}) if !opts[:filename] && !opts[:namer] opts[:namer] = SitemapGenerator::SimpleNamer.new(:sitemap) end super(opts) end
Public Instance Methods
create_index()
click to toggle source
Whether to create a sitemap index. Default ‘:auto`. See LinkSet::create_index=
for possible values.
A placeholder for an option which should really go into some kind of options class.
# File lib/sitemap_generator/sitemap_location.rb, line 180 def create_index self[:create_index] end
summary(link_count)
click to toggle source
Return a summary string
# File lib/sitemap_generator/sitemap_location.rb, line 185 def summary(link_count) filesize = number_to_human_size(self.filesize) width = self.class::PATH_OUTPUT_WIDTH - 3 path = SitemapGenerator::Utilities.ellipsis(self.path_in_public, width) "+ #{('%-'+width.to_s+'s') % path} #{'%10s' % link_count} sitemaps / #{'%10s' % filesize}" end