Module: SitemapGenerator

Defined in:
lib/sitemap_generator/link_set.rb,
lib/sitemap_generator.rb,
lib/sitemap_generator/railtie.rb,
lib/sitemap_generator/templates.rb,
lib/sitemap_generator/utilities.rb,
lib/sitemap_generator/interpreter.rb,
lib/sitemap_generator/application.rb,
lib/sitemap_generator/sitemap_namer.rb,
lib/sitemap_generator/sitemap_location.rb,
lib/sitemap_generator/adapters/s3_adapter.rb,
lib/sitemap_generator/builder/sitemap_url.rb,
lib/sitemap_generator/adapters/fog_adapter.rb,
lib/sitemap_generator/builder/sitemap_file.rb,
lib/sitemap_generator/helpers/number_helper.rb,
lib/sitemap_generator/adapters/file_adapter.rb,
lib/sitemap_generator/adapters/wave_adapter.rb,
lib/sitemap_generator/builder/sitemap_index_url.rb,
lib/sitemap_generator/builder/sitemap_index_file.rb

Overview

A LinkSet provisions a bunch of links to sitemap files. It also writes the index file which lists all the sitemap files written.

Defined Under Namespace

Modules: Builder, Helpers, Utilities Classes: Application, BigDecimal, FileAdapter, FogAdapter, Interpreter, LinkSet, Numeric, Railtie, S3Adapter, SimpleNamer, SitemapIndexLocation, SitemapLocation, Templates, WaveAdapter

Constant Summary

SitemapError =
Class.new(StandardError)
SitemapFullError =
Class.new(SitemapError)
SitemapFinalizedError =
Class.new(SitemapError)

Class Attribute Summary (collapse)

Class Method Summary (collapse)

Class Attribute Details

+ (Object) app

Returns the value of attribute app



53
54
55
# File 'lib/sitemap_generator.rb', line 53

def app
  @app
end

+ (Object) root

Returns the value of attribute root



53
54
55
# File 'lib/sitemap_generator.rb', line 53

def root
  @root
end

+ (Object) templates

Returns the value of attribute templates



53
54
55
# File 'lib/sitemap_generator.rb', line 53

def templates
  @templates
end

+ (Object) verbose

Global default for the verbose setting.



58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/sitemap_generator.rb', line 58

def self.verbose
  if @verbose.nil?
    @verbose = if SitemapGenerator::Utilities.truthy?(ENV['VERBOSE'])
      true
    elsif SitemapGenerator::Utilities.falsy?(ENV['VERBOSE'])
      false
    else
      nil
    end
  else
    @verbose
  end
end

+ (Object) yield_sitemap=(value) (writeonly)

Sets the attribute yield_sitemap

Parameters:

  • value

    the value to set the attribute yield_sitemap to.



54
55
56
# File 'lib/sitemap_generator.rb', line 54

def yield_sitemap=(value)
  @yield_sitemap = value
end

Class Method Details

+ (Boolean) yield_sitemap?

Returns true if we should yield the sitemap instance to the block, false otherwise.

Returns:

  • (Boolean)


73
74
75
# File 'lib/sitemap_generator.rb', line 73

def self.yield_sitemap?
  !!@yield_sitemap
end