Class: Mongo::Event::StandaloneDiscovered
- Inherits:
-
Object
- Object
- Mongo::Event::StandaloneDiscovered
- Defined in:
- lib/mongo/event/standalone_discovered.rb
Overview
This handles when a standalone is discovered.
Instance Attribute Summary collapse
-
#cluster ⇒ Mongo::Cluster
readonly
Cluster The event publisher.
Instance Method Summary collapse
-
#handle(description) ⇒ Object
This event tells the cluster to notify its topology that a standalone was discovered.
-
#initialize(cluster) ⇒ StandaloneDiscovered
constructor
Initialize the new standalone discovered event handler.
Constructor Details
#initialize(cluster) ⇒ StandaloneDiscovered
Initialize the new standalone discovered event handler.
34 35 36 |
# File 'lib/mongo/event/standalone_discovered.rb', line 34 def initialize(cluster) @cluster = cluster end |
Instance Attribute Details
#cluster ⇒ Mongo::Cluster (readonly)
Returns cluster The event publisher.
24 25 26 |
# File 'lib/mongo/event/standalone_discovered.rb', line 24 def cluster @cluster end |
Instance Method Details
#handle(description) ⇒ Object
This event tells the cluster to notify its topology that a standalone was discovered.
48 49 50 |
# File 'lib/mongo/event/standalone_discovered.rb', line 48 def handle(description) cluster.standalone_discovered end |