Class: SitemapGenerator::Link
- Inherits:
-
Object
- Object
- SitemapGenerator::Link
- Defined in:
- lib/sitemap_generator/link.rb
Class Method Summary collapse
Class Method Details
.generate(path, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/sitemap_generator/link.rb', line 5 def generate(path, = {}) .assert_valid_keys(:priority, :changefreq, :lastmod, :host) .reverse_merge!(:priority => 0.5, :changefreq => 'weekly', :lastmod => Time.now, :host => Sitemap.default_host) { :path => path, :priority => [:priority], :changefreq => [:changefreq], :lastmod => [:lastmod], :host => [:host], :loc => URI.join([:host], path).to_s } end |