Class: Mascot::RailsConfiguration
- Inherits:
-
Object
- Object
- Mascot::RailsConfiguration
- Defined in:
- lib/mascot/rails_configuration.rb
Overview
Configuration object for rails application.
Constant Summary collapse
- DEFAULT_SITEMAP_ROOT =
Store in ./app/pages by default.
"app/pages".freeze
Instance Attribute Summary collapse
-
#cache_resources ⇒ Object
Returns the value of attribute cache_resources.
-
#parent_engine ⇒ Object
Returns the value of attribute parent_engine.
-
#resources ⇒ Object
Returns the value of attribute resources.
-
#routes ⇒ Object
Returns the value of attribute routes.
-
#sitemap ⇒ Object
Returns the value of attribute sitemap.
Instance Method Summary collapse
- #cache_resources? ⇒ Boolean
-
#initialize ⇒ RailsConfiguration
constructor
Set defaults.
Constructor Details
#initialize ⇒ RailsConfiguration
Set defaults.
10 11 12 13 14 |
# File 'lib/mascot/rails_configuration.rb', line 10 def initialize @routes = true @parent_engine = Rails.application @cache_resources = @parent_engine.config.cache_classes end |
Instance Attribute Details
#cache_resources ⇒ Object
Returns the value of attribute cache_resources.
7 8 9 |
# File 'lib/mascot/rails_configuration.rb', line 7 def cache_resources @cache_resources end |
#parent_engine ⇒ Object
Returns the value of attribute parent_engine.
7 8 9 |
# File 'lib/mascot/rails_configuration.rb', line 7 def parent_engine @parent_engine end |
#resources ⇒ Object
Returns the value of attribute resources.
7 8 9 |
# File 'lib/mascot/rails_configuration.rb', line 7 def resources @resources end |
#routes ⇒ Object
Returns the value of attribute routes.
7 8 9 |
# File 'lib/mascot/rails_configuration.rb', line 7 def routes @routes end |
#sitemap ⇒ Object
Returns the value of attribute sitemap.
7 8 9 |
# File 'lib/mascot/rails_configuration.rb', line 7 def sitemap @sitemap end |
Instance Method Details
#cache_resources? ⇒ Boolean
27 28 29 |
# File 'lib/mascot/rails_configuration.rb', line 27 def cache_resources? !!@cache_resources end |