Class: Mascot::RailsConfiguration

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

Instance Method Summary collapse

Constructor Details

#initializeRailsConfiguration

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_resourcesObject

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_engineObject

Returns the value of attribute parent_engine.



7
8
9
# File 'lib/mascot/rails_configuration.rb', line 7

def parent_engine
  @parent_engine
end

#resourcesObject

Returns the value of attribute resources.



7
8
9
# File 'lib/mascot/rails_configuration.rb', line 7

def resources
  @resources
end

#routesObject

Returns the value of attribute routes.



7
8
9
# File 'lib/mascot/rails_configuration.rb', line 7

def routes
  @routes
end

#sitemapObject

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

Returns:

  • (Boolean)


27
28
29
# File 'lib/mascot/rails_configuration.rb', line 27

def cache_resources?
  !!@cache_resources
end