class Blacklight::Generators::SitemapGenerator
Public Class Methods
source_root()
click to toggle source
# File lib/rails/generators/blacklight/sitemap/sitemap_generator.rb, line 6 def self.source_root @_blacklight_source_root ||= File.expand_path("../templates", __FILE__) end
Public Instance Methods
create_blacklight_sitemap_task()
click to toggle source
# File lib/rails/generators/blacklight/sitemap/sitemap_generator.rb, line 11 def create_blacklight_sitemap_task rakefile_path = File.join(Rails.root,'Rakefile') rakefile = File.read(rakefile_path) if rakefile.scan('Rake::BlacklightSitemapTask.new').empty? append_to_file(rakefile_path, File.read(File.join(File.dirname(__FILE__),'templates/default_rake_task.rb'))) end end