Class: MassiveSitemap::Builder::Rotating
- Defined in:
- lib/massive_sitemap/builder/rotating.rb
Constant Summary collapse
Constants inherited from Base
Base::HEADER_ATTRIBUTES, Base::HEADER_NAME
Instance Method Summary collapse
Methods inherited from Base
#add, #close!, generate, #init_writer!, #initialize
Constructor Details
This class inherits a constructor from MassiveSitemap::Builder::Base
Instance Method Details
#add_url!(location, attrs = {}) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/massive_sitemap/builder/rotating.rb', line 19 def add_url!(location, attrs = {}) if @urls.to_i >= @options[:max_urls] close! end super @urls += 1 end |
#header!(&block) ⇒ Object
14 15 16 17 |
# File 'lib/massive_sitemap/builder/rotating.rb', line 14 def header!(&block) @urls = 0 super end |