Class: Michael::Services::Configuration
- Inherits:
-
Object
- Object
- Michael::Services::Configuration
- Defined in:
- lib/michael/services/configuration.rb
Instance Method Summary collapse
- #append(*values, to: nil) ⇒ Object
- #fetch(*keys, default: nil) ⇒ Object
-
#initialize(config) ⇒ Configuration
constructor
A new instance of Configuration.
- #remove(*values, from: nil) ⇒ Object
- #set(*keys, value: nil) ⇒ Object
Constructor Details
#initialize(config) ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 |
# File 'lib/michael/services/configuration.rb', line 10 def initialize(config) raise Error, 'configuration is not initialized' if config.nil? @config = config end |
Instance Method Details
#append(*values, to: nil) ⇒ Object
20 21 22 |
# File 'lib/michael/services/configuration.rb', line 20 def append(*values, to: nil) interact(:append, *values, to: to) end |
#fetch(*keys, default: nil) ⇒ Object
24 25 26 |
# File 'lib/michael/services/configuration.rb', line 24 def fetch(*keys, default: nil) interact(:fetch, *keys, default: default) end |
#remove(*values, from: nil) ⇒ Object
28 29 30 |
# File 'lib/michael/services/configuration.rb', line 28 def remove(*values, from: nil) interact(:remove, *values, from: from) end |
#set(*keys, value: nil) ⇒ Object
16 17 18 |
# File 'lib/michael/services/configuration.rb', line 16 def set(*keys, value: nil) interact(:set, *keys, value: value) end |