Class: RFlow::Configuration::Setting
- Inherits:
-
ConfigurationItem
- Object
- ActiveRecord::Base
- ConfigurationItem
- RFlow::Configuration::Setting
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/rflow/configuration/setting.rb
Overview
Represents a setting in the SQLite database.
Constant Summary collapse
- DEFAULTS =
Default settings.
{ 'rflow.application_name' => 'rflow', 'rflow.application_directory_path' => '.', 'rflow.pid_directory_path' => 'run', # relative to rflow.application_directory_path 'rflow.log_directory_path' => 'log', # relative to rflow.application_directory_path 'rflow.log_file_path' => lambda {File.join(Setting['rflow.log_directory_path'], Setting['rflow.application_name'] + '.log')}, 'rflow.pid_file_path' => lambda {File.join(Setting['rflow.pid_directory_path'], Setting['rflow.application_name'] + '.pid')}, 'rflow.log_level' => 'INFO', }
Class Method Summary collapse
-
.[](name) ⇒ Setting
Look up a Setting by name from the SQLite database.
Class Method Details
.[](name) ⇒ Setting
Look up a RFlow::Configuration::Setting by name from the SQLite database.
61 62 63 |
# File 'lib/rflow/configuration/setting.rb', line 61 def self.[](name) Setting.find(name).value rescue nil end |