Class: Monittr::Cluster
- Inherits:
-
Object
- Object
- Monittr::Cluster
- Defined in:
- lib/monittr.rb
Overview
Represents a cluster of monitored instances. Pass and array of URLs to the constructor.
Instance Attribute Summary collapse
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
Instance Method Summary collapse
-
#initialize(urls = []) ⇒ Cluster
constructor
A new instance of Cluster.
Constructor Details
#initialize(urls = []) ⇒ Cluster
Returns a new instance of Cluster.
15 16 17 |
# File 'lib/monittr.rb', line 15 def initialize(urls=[]) @servers = urls.map { |url| Server.fetch(url) } end |
Instance Attribute Details
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
13 14 15 |
# File 'lib/monittr.rb', line 13 def servers @servers end |