Class: Jupiter::Configuration
- Inherits:
-
Object
- Object
- Jupiter::Configuration
- Defined in:
- lib/jupiter/configuration.rb
Instance Attribute Summary collapse
-
#hosts ⇒ Object
Returns the value of attribute hosts.
-
#nagios ⇒ Object
Returns the value of attribute nagios.
-
#templates ⇒ Object
Returns the value of attribute templates.
-
#vmusers ⇒ Object
Returns the value of attribute vmusers.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 15 |
# File 'lib/jupiter/configuration.rb', line 10 def initialize( = {}) @hosts = .fetch(:hosts) {[]} @vmusers = .fetch(:vmusers) { {} } @templates = .fetch(:templates) { {} } @nagios = .fetch(:nagios) { {} } end |
Instance Attribute Details
#hosts ⇒ Object
Returns the value of attribute hosts.
3 4 5 |
# File 'lib/jupiter/configuration.rb', line 3 def hosts @hosts end |
#nagios ⇒ Object
Returns the value of attribute nagios.
3 4 5 |
# File 'lib/jupiter/configuration.rb', line 3 def nagios @nagios end |
#templates ⇒ Object
Returns the value of attribute templates.
3 4 5 |
# File 'lib/jupiter/configuration.rb', line 3 def templates @templates end |
#vmusers ⇒ Object
Returns the value of attribute vmusers.
3 4 5 |
# File 'lib/jupiter/configuration.rb', line 3 def vmusers @vmusers end |
Class Method Details
.load_from_yaml! ⇒ Object
5 6 7 8 |
# File 'lib/jupiter/configuration.rb', line 5 def self.load_from_yaml! config = YAML.load_file('config.yaml') new(config) end |