Class: Mascot::RailsConfiguration
- Inherits:
-
Object
- Object
- Mascot::RailsConfiguration
- Extended by:
- Forwardable
- Defined in:
- lib/mascot/rails_configuration.rb
Overview
Configuration object for rails application.
Constant Summary collapse
- DEFAULT_SITE_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.
-
#routes ⇒ Object
Returns the value of attribute routes.
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
-
#initialize ⇒ RailsConfiguration
constructor
Set defaults.
Constructor Details
#initialize ⇒ RailsConfiguration
Set defaults.
16 17 18 19 20 |
# File 'lib/mascot/rails_configuration.rb', line 16 def initialize self.routes = true self.parent_engine = Rails.application self.cache_resources = parent_engine.config.cache_classes end |
Instance Attribute Details
#cache_resources ⇒ Object
Returns the value of attribute cache_resources.
9 10 11 |
# File 'lib/mascot/rails_configuration.rb', line 9 def cache_resources @cache_resources end |
#parent_engine ⇒ Object
Returns the value of attribute parent_engine.
9 10 11 |
# File 'lib/mascot/rails_configuration.rb', line 9 def parent_engine @parent_engine end |
#routes ⇒ Object
Returns the value of attribute routes.
9 10 11 |
# File 'lib/mascot/rails_configuration.rb', line 9 def routes @routes end |
#site ⇒ Object
Returns the value of attribute site.
9 10 11 |
# File 'lib/mascot/rails_configuration.rb', line 9 def site @site end |