Class: Meter::Configuration
- Inherits:
-
Object
- Object
- Meter::Configuration
- Defined in:
- lib/meter/configuration.rb
Instance Attribute Summary collapse
- #environment ⇒ Object
- #logger ⇒ Object
- #namespace ⇒ Object
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #log_dir ⇒ Object
- #log_dir=(new_dir) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 |
# File 'lib/meter/configuration.rb', line 10 def initialize( = {}) @options = end |
Instance Attribute Details
#environment ⇒ Object
24 25 26 |
# File 'lib/meter/configuration.rb', line 24 def environment @environment ||= [:environment] || default_environment end |
#logger ⇒ Object
14 15 16 |
# File 'lib/meter/configuration.rb', line 14 def logger @logger ||= [:logger] || default_logger end |
#namespace ⇒ Object
19 20 21 |
# File 'lib/meter/configuration.rb', line 19 def namespace @namespace ||= [:namespace] || default_namespace end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
8 9 10 |
# File 'lib/meter/configuration.rb', line 8 def @options end |
Instance Method Details
#log_dir ⇒ Object
29 30 31 |
# File 'lib/meter/configuration.rb', line 29 def log_dir @log_dir ||= (::Pathname.new([:log_dir]) if [:log_dir]) || default_log_dir end |
#log_dir=(new_dir) ⇒ Object
33 34 35 |
# File 'lib/meter/configuration.rb', line 33 def log_dir=(new_dir) @log_dir = Pathname.new new_dir end |