Class: SitemapGenerator::Application
- Inherits:
-
Object
- Object
- SitemapGenerator::Application
- Defined in:
- lib/sitemap_generator/application.rb
Instance Method Summary collapse
-
#rails3? ⇒ Boolean
Returns a boolean indicating whether this environment is Rails 3.
- #rails? ⇒ Boolean
- #root ⇒ Object
Instance Method Details
#rails3? ⇒ Boolean
Returns a boolean indicating whether this environment is Rails 3
12 13 14 15 16 |
# File 'lib/sitemap_generator/application.rb', line 12 def rails3? rails? && Rails.version.to_f >= 3 rescue false # Rails.version defined in 2.1.0 end |
#rails? ⇒ Boolean
5 6 7 |
# File 'lib/sitemap_generator/application.rb', line 5 def rails? defined?(Rails) end |
#root ⇒ Object
18 19 20 |
# File 'lib/sitemap_generator/application.rb', line 18 def root Pathname.new(rails_root || Dir.getwd) end |