Class: SitemapGenerator::LinkSet
- Inherits:
-
Object
- Object
- SitemapGenerator::LinkSet
- Defined in:
- lib/sitemap_generator/link_set.rb
Instance Attribute Summary collapse
-
#default_host ⇒ Object
Returns the value of attribute default_host.
-
#links ⇒ Object
Returns the value of attribute links.
-
#yahoo_app_id ⇒ Object
Returns the value of attribute yahoo_app_id.
Instance Method Summary collapse
- #add_default_links ⇒ Object
- #add_link(link) ⇒ Object
- #add_links {|Mapper.new(self)| ... } ⇒ Object
-
#initialize ⇒ LinkSet
constructor
A new instance of LinkSet.
Constructor Details
#initialize ⇒ LinkSet
Returns a new instance of LinkSet.
5 6 7 |
# File 'lib/sitemap_generator/link_set.rb', line 5 def initialize @links = [] end |
Instance Attribute Details
#default_host ⇒ Object
Returns the value of attribute default_host.
3 4 5 |
# File 'lib/sitemap_generator/link_set.rb', line 3 def default_host @default_host end |
#links ⇒ Object
Returns the value of attribute links.
3 4 5 |
# File 'lib/sitemap_generator/link_set.rb', line 3 def links @links end |
#yahoo_app_id ⇒ Object
Returns the value of attribute yahoo_app_id.
3 4 5 |
# File 'lib/sitemap_generator/link_set.rb', line 3 def yahoo_app_id @yahoo_app_id end |
Instance Method Details
#add_default_links ⇒ Object
14 15 16 17 18 |
# File 'lib/sitemap_generator/link_set.rb', line 14 def add_default_links # Add default links @links << Link.generate('/', :lastmod => Time.now, :changefreq => 'always', :priority => 1.0) @links << Link.generate('/sitemap_index.xml.gz', :lastmod => Time.now, :changefreq => 'always', :priority => 1.0) end |
#add_link(link) ⇒ Object
24 25 26 |
# File 'lib/sitemap_generator/link_set.rb', line 24 def add_link(link) @links << link end |