Class: MrLogaLoga::Configuration
- Inherits:
-
Object
- Object
- MrLogaLoga::Configuration
- Defined in:
- lib/mr_loga_loga/configuration.rb
Overview
Description
The configuration class for MrLogaLoga
Usage
MrLogaLoga.configure do |configuration|
configuration.logger = ...
end
Instance Attribute Summary collapse
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Configuration
constructor
Initialize the configuration by setting configuration default values.
-
#reset ⇒ Object
Reset the configuration to default values.
Constructor Details
#initialize(**kwargs) ⇒ Configuration
Initialize the configuration by setting configuration default values
17 18 19 20 |
# File 'lib/mr_loga_loga/configuration.rb', line 17 def initialize(**kwargs) reset kwargs.each { |key, value| instance_variable_set("@#{key}", value) } end |
Instance Attribute Details
#logger ⇒ Object
Returns the value of attribute logger.
14 15 16 |
# File 'lib/mr_loga_loga/configuration.rb', line 14 def logger @logger end |
Instance Method Details
#reset ⇒ Object
Reset the configuration to default values
23 24 25 |
# File 'lib/mr_loga_loga/configuration.rb', line 23 def reset @logger = MrLogaLoga::Logger.new($stdout) end |