Class: Cartography::Cluster
- Inherits:
-
Object
- Object
- Cartography::Cluster
- Defined in:
- lib/cartography/cluster.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#cluster_id ⇒ Object
readonly
Returns the value of attribute cluster_id.
-
#endpoints ⇒ Object
readonly
Returns the value of attribute endpoints.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#site_list ⇒ Object
readonly
Returns the value of attribute site_list.
-
#sites ⇒ Object
readonly
Returns the value of attribute sites.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Cluster
constructor
A new instance of Cluster.
Constructor Details
#initialize(params = {}) ⇒ Cluster
Returns a new instance of Cluster.
13 14 15 16 17 18 19 20 21 |
# File 'lib/cartography/cluster.rb', line 13 def initialize(params = {}) @cluster_id = params["ClusterID"] @environment = params["Environment"] @type = params["Type"] @namespace = params["Namespace"] @site_list = params["SiteList"] @sites = params["Sites"].map { |s| Site.new(s) } @endpoints = Endpoints.new(params["Endpoints"]) end |
Instance Attribute Details
#cluster_id ⇒ Object (readonly)
Returns the value of attribute cluster_id.
5 6 7 |
# File 'lib/cartography/cluster.rb', line 5 def cluster_id @cluster_id end |
#endpoints ⇒ Object (readonly)
Returns the value of attribute endpoints.
5 6 7 |
# File 'lib/cartography/cluster.rb', line 5 def endpoints @endpoints end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
5 6 7 |
# File 'lib/cartography/cluster.rb', line 5 def environment @environment end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace.
5 6 7 |
# File 'lib/cartography/cluster.rb', line 5 def namespace @namespace end |
#site_list ⇒ Object (readonly)
Returns the value of attribute site_list.
5 6 7 |
# File 'lib/cartography/cluster.rb', line 5 def site_list @site_list end |
#sites ⇒ Object (readonly)
Returns the value of attribute sites.
5 6 7 |
# File 'lib/cartography/cluster.rb', line 5 def sites @sites end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/cartography/cluster.rb', line 5 def type @type end |