Class: Meter::Configuration
- Inherits:
-
Object
- Object
- Meter::Configuration
- Defined in:
- lib/meter/configuration.rb
Instance Attribute Summary collapse
- #backends ⇒ Object
- #environment ⇒ Object
- #hostname ⇒ 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.
9 10 11 |
# File 'lib/meter/configuration.rb', line 9 def initialize( = {}) @options = end |
Instance Attribute Details
#backends ⇒ Object
41 42 43 |
# File 'lib/meter/configuration.rb', line 41 def backends @backends ||= [] end |
#environment ⇒ Object
23 24 25 |
# File 'lib/meter/configuration.rb', line 23 def environment @environment ||= [:environment] || default_environment end |
#hostname ⇒ Object
36 37 38 |
# File 'lib/meter/configuration.rb', line 36 def hostname @hostname ||= [:hostname] || default_hostname end |
#logger ⇒ Object
13 14 15 |
# File 'lib/meter/configuration.rb', line 13 def logger @logger ||= [:logger] || default_logger end |
#namespace ⇒ Object
18 19 20 |
# File 'lib/meter/configuration.rb', line 18 def namespace @namespace ||= [:namespace] || default_namespace end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/meter/configuration.rb', line 7 def @options end |
Instance Method Details
#log_dir ⇒ Object
28 29 30 |
# File 'lib/meter/configuration.rb', line 28 def log_dir @log_dir ||= (::Pathname.new([:log_dir]) if [:log_dir]) || default_log_dir end |
#log_dir=(new_dir) ⇒ Object
32 33 34 |
# File 'lib/meter/configuration.rb', line 32 def log_dir=(new_dir) @log_dir = Pathname.new new_dir end |