Class: Locomotive::Configuration
- Inherits:
-
Object
- Object
- Locomotive::Configuration
- Defined in:
- lib/locomotive/configuration.rb
Constant Summary collapse
- @@default_locales =
%w{en de fr pl pt pt-BR it nl nb es ru et lt ja zh-CN cs bg sk sr sv}
- @@defaults =
{ name: 'Locomotive', host: nil, # forbidden_paths: %w{layouts snippets stylesheets javascripts assets admin system api}, reserved_site_handles: %w(sites my_account password sign_in sign_out), reserved_slugs: %w{stylesheets javascripts assets admin locomotive images api pages edit}, reserved_domains: [], locales: @@default_locales, site_locales: @@default_locales, cookie_key: '_locomotive_session', enable_logs: false, enable_admin_ssl: false, delayed_job: false, default_locale: :en, mailer_sender: '[email protected]', unsafe_token_authentication: false, enable_registration: true, ui: { per_page: 10 }, rack_cache: { verbose: true, metastore: URI.encode("file:#{Rails.root}/tmp/dragonfly/cache/meta"), # URI encoded in case of spaces entitystore: URI.encode("file:#{Rails.root}/tmp/dragonfly/cache/body") }, devise_modules: [:registerable, :rememberable, :database_authenticatable, :recoverable, :trackable, :validatable, :encryptable, { encryptor: :sha1 }], steam_image_resizer_secret: 'please change it' }
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
37 38 39 |
# File 'lib/locomotive/configuration.rb', line 37 def initialize @@settings = self.class.get_from_hash(@@defaults) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
45 46 47 |
# File 'lib/locomotive/configuration.rb', line 45 def method_missing(name, *args, &block) self.settings.send(name, *args, &block) end |
Class Method Details
.settings ⇒ Object
41 42 43 |
# File 'lib/locomotive/configuration.rb', line 41 def self.settings @@settings end |