Class: Clustr::ClusterCollection
- Inherits:
-
Hash
- Object
- Hash
- Clustr::ClusterCollection
- Defined in:
- lib/clustr/cluster_collection.rb
Overview
Note:
The key for each cluster is its name, ie. “rabbitmq”
Represents a collection of the current Cluster configurations. This class can handle initializing clusters that have been defined through Clustr::Config::Clusters.
Instance Method Summary collapse
-
#initialize(configurations = {}) ⇒ ClusterCollection
constructor
Initializes a collection of Cluster instances, by looping through the configurations that have been passed in.
Constructor Details
#initialize(configurations = {}) ⇒ ClusterCollection
Initializes a collection of Clustr::Cluster instances, by looping through the configurations that have been passed in.
22 23 24 25 26 |
# File 'lib/clustr/cluster_collection.rb', line 22 def initialize(configurations = {}) configurations.each do |name, config| self[name] = Clustr::Cluster.new(name, config) end end |