Class: Mascot::RailsConfiguration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeRailsConfiguration

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_resourcesObject

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_engineObject

Returns the value of attribute parent_engine.



9
10
11
# File 'lib/mascot/rails_configuration.rb', line 9

def parent_engine
  @parent_engine
end

#routesObject

Returns the value of attribute routes.



9
10
11
# File 'lib/mascot/rails_configuration.rb', line 9

def routes
  @routes
end

#siteObject

Returns the value of attribute site.



9
10
11
# File 'lib/mascot/rails_configuration.rb', line 9

def site
  @site
end