Class: Vitals::Configuration
- Inherits:
-
Object
- Object
- Vitals::Configuration
- Defined in:
- lib/vitals/configuration.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#facility ⇒ Object
Returns the value of attribute facility.
-
#format ⇒ Object
Returns the value of attribute format.
-
#host ⇒ Object
Returns the value of attribute host.
-
#reporter ⇒ Object
Returns the value of attribute reporter.
Instance Method Summary collapse
- #build_format ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #path_sep ⇒ Object
-
#path_sep=(val) ⇒ Object
delegate to utils, until this part of the utils finds a new home with a new abstraction.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 |
# File 'lib/vitals/configuration.rb', line 9 def initialize @environment = fetch_development @facility = "default" @host = fetch_host @reporter = Vitals::Reporters::InmemReporter.new @format = Vitals::Formats::ProductionFormat self.path_sep = '.' end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
3 4 5 |
# File 'lib/vitals/configuration.rb', line 3 def environment @environment end |
#facility ⇒ Object
Returns the value of attribute facility.
4 5 6 |
# File 'lib/vitals/configuration.rb', line 4 def facility @facility end |
#format ⇒ Object
Returns the value of attribute format.
7 8 9 |
# File 'lib/vitals/configuration.rb', line 7 def format @format end |
#host ⇒ Object
Returns the value of attribute host.
5 6 7 |
# File 'lib/vitals/configuration.rb', line 5 def host @host end |
#reporter ⇒ Object
Returns the value of attribute reporter.
6 7 8 |
# File 'lib/vitals/configuration.rb', line 6 def reporter @reporter end |
Instance Method Details
#build_format ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/vitals/configuration.rb', line 28 def build_format @format.new( environment: self.environment, facility: self.facility, host: self.host ) end |