Class: Hoodie::Configuration
Overview
A Configuration instance
Instance Attribute Summary collapse
-
#level ⇒ Object
Access to the logging level for this instance.
-
#logging ⇒ Object
Access the logging setting for this instance.
Instance Method Summary collapse
-
#initialize(options = {}) {|_self| ... } ⇒ undefined
constructor
private
Initialized a configuration instance.
- #to_h ⇒ Object private
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialized a configuration instance
19 20 21 22 23 24 |
# File 'lib/hoodie/configuration.rb', line 19 def initialize(={}) @logging = .fetch(:logging, false) @level = .fetch(:level, :info) yield self if block_given? end |
Instance Attribute Details
#level ⇒ Object
Access to the logging level for this instance
12 13 14 |
# File 'lib/hoodie/configuration.rb', line 12 def level @level end |
#logging ⇒ Object
Access the logging setting for this instance
9 10 11 |
# File 'lib/hoodie/configuration.rb', line 9 def logging @logging end |
Instance Method Details
#to_h ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 30 31 |
# File 'lib/hoodie/configuration.rb', line 27 def to_h { logging: logging, level: level }.freeze end |