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/application.rb,
lib/sitemap_generator/interpreter.rb,
lib/sitemap_generator/simple_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/adapters/file_adapter.rb,
lib/sitemap_generator/adapters/wave_adapter.rb,
lib/sitemap_generator/helpers/number_helper.rb,
lib/sitemap_generator/adapters/aws_sdk_adapter.rb,
lib/sitemap_generator/builder/sitemap_index_url.rb,
lib/sitemap_generator/builder/sitemap_index_file.rb,
lib/sitemap_generator/adapters/google_storage_adapter.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, AwsSdkAdapter, BigDecimal, FileAdapter, FogAdapter, GoogleStorageAdapter, Interpreter, LinkSet, Numeric, Railtie, S3Adapter, SimpleNamer, SitemapIndexLocation, SitemapLocation, Templates, WaveAdapter

Constant Summary collapse

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

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.appObject

Returns the value of attribute app.



59
60
61
# File 'lib/sitemap_generator.rb', line 59

def app
  @app
end

.rootObject

Returns the value of attribute root.



59
60
61
# File 'lib/sitemap_generator.rb', line 59

def root
  @root
end

.templatesObject

Returns the value of attribute templates.



59
60
61
# File 'lib/sitemap_generator.rb', line 59

def templates
  @templates
end

.verboseObject

Global default for the verbose setting.



65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/sitemap_generator.rb', line 65

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

.yield_sitemap=(value) ⇒ Object (writeonly)

Sets the attribute yield_sitemap

Parameters:

  • value

    the value to set the attribute yield_sitemap to.



60
61
62
# File 'lib/sitemap_generator.rb', line 60

def yield_sitemap=(value)
  @yield_sitemap = value
end

Class Method Details

.yield_sitemap?Boolean

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

Returns:

  • (Boolean)


80
81
82
# File 'lib/sitemap_generator.rb', line 80

def self.yield_sitemap?
  !!@yield_sitemap
end