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_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.
-
#partials ⇒ Object
Returns the value of attribute partials.
-
#resources ⇒ Object
Returns the value of attribute resources.
-
#routes ⇒ Object
Returns the value of attribute routes.
-
#site ⇒ Object
Returns the value of attribute site.
Instance Method Summary collapse
- #cache_resources? ⇒ Boolean
-
#initialize ⇒ RailsConfiguration
constructor
Set defaults.
Constructor Details
#initialize ⇒ RailsConfiguration
Set defaults.
10 11 12 13 14 15 |
# File 'lib/mascot/rails_configuration.rb', line 10 def initialize @routes = true @parent_engine = Rails.application @cache_resources = @parent_engine.config.cache_classes @partials = false 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 |
#partials ⇒ Object
Returns the value of attribute partials.
7 8 9 |
# File 'lib/mascot/rails_configuration.rb', line 7 def partials @partials 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 |
#site ⇒ Object
Returns the value of attribute site.
7 8 9 |
# File 'lib/mascot/rails_configuration.rb', line 7 def site @site end |
Instance Method Details
#cache_resources? ⇒ Boolean
31 32 33 |
# File 'lib/mascot/rails_configuration.rb', line 31 def cache_resources? !!@cache_resources end |