Class: SitemapGenerator::Interpreter
- Inherits:
-
Object
- Object
- SitemapGenerator::Interpreter
- Includes:
- ActionController::UrlWriter
- Defined in:
- lib/sitemap_generator/interpreter.rb
Overview
Evaluate a sitemap config file within the context of a class that includes the Rails URL helpers.
Class Method Summary collapse
-
.run ⇒ Object
KJV do we need this? We should be using path_* helpers.
Instance Method Summary collapse
-
#initialize(sitemap_config_file = nil) ⇒ Interpreter
constructor
A new instance of Interpreter.
Constructor Details
#initialize(sitemap_config_file = nil) ⇒ Interpreter
Returns a new instance of Interpreter.
14 15 16 17 |
# File 'lib/sitemap_generator/interpreter.rb', line 14 def initialize(sitemap_config_file=nil) sitemap_config_file ||= File.join(::Rails.root, 'config/sitemap.rb') eval(open(sitemap_config_file).read) end |
Class Method Details
.run ⇒ Object
KJV do we need this? We should be using path_* helpers. def self.default_url_options(options = nil)
{ :host => SitemapGenerator::Sitemap.default_host }
end
24 25 26 |
# File 'lib/sitemap_generator/interpreter.rb', line 24 def self.run new end |