Class: Dryad::Configuration
- Inherits:
-
Object
- Object
- Dryad::Configuration
- Defined in:
- lib/dryad/configuration.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ consul: { host: '127.0.0.1', port: 8500 }, service: {} }
Instance Attribute Summary collapse
-
#consul ⇒ Object
Returns the value of attribute consul.
-
#group ⇒ Object
Returns the value of attribute group.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#provider ⇒ Object
Returns the value of attribute provider.
-
#registry ⇒ Object
Returns the value of attribute registry.
-
#service ⇒ Object
Returns the value of attribute service.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(opts = {}) ⇒ Configuration
Returns a new instance of Configuration.
13 14 15 16 17 18 19 20 21 |
# File 'lib/dryad/configuration.rb', line 13 def initialize(opts = {}) opts = DEFAULT_OPTIONS.merge(opts) @consul = opts[:consul] @namespace = opts[:namespace] @group = opts[:group] @registry = opts[:registry] @provider = opts[:provider] @service = opts[:service] end |
Instance Attribute Details
#consul ⇒ Object
Returns the value of attribute consul.
3 4 5 |
# File 'lib/dryad/configuration.rb', line 3 def consul @consul end |
#group ⇒ Object
Returns the value of attribute group.
3 4 5 |
# File 'lib/dryad/configuration.rb', line 3 def group @group end |
#namespace ⇒ Object
Returns the value of attribute namespace.
3 4 5 |
# File 'lib/dryad/configuration.rb', line 3 def namespace @namespace end |
#provider ⇒ Object
Returns the value of attribute provider.
3 4 5 |
# File 'lib/dryad/configuration.rb', line 3 def provider @provider end |
#registry ⇒ Object
Returns the value of attribute registry.
3 4 5 |
# File 'lib/dryad/configuration.rb', line 3 def registry @registry end |
#service ⇒ Object
Returns the value of attribute service.
3 4 5 |
# File 'lib/dryad/configuration.rb', line 3 def service @service end |