Class: Sitemapper::SitemapXML

Inherits:
Object
  • Object
show all
Defined in:
lib/sitemapper/sitemap_xml.rb

Direct Known Subclasses

Map

Constant Summary collapse

SCHEMA =

:nodoc:

'http://www.sitemaps.org/schemas/sitemap/0.9'
INDENT =

:nodoc:

-1 #:nodoc:
@@root_tag =
nil

Instance Method Summary collapse

Constructor Details

#initialize(file) ⇒ SitemapXML

Initialize a map

  • file is the path to the (new or existent) sitemap.xml



13
14
15
16
17
18
# File 'lib/sitemapper/sitemap_xml.rb', line 13

def initialize(file)
  @file = file
  @write = true
  @gzip = @file =~ /gz$/i
  initialize_map
end