Class: Master
- Inherits:
-
Object
- Object
- Master
- Defined in:
- lib/notifyhub.rb
Instance Attribute Summary (collapse)
-
- (Object) hub
Returns the value of attribute hub.
Instance Method Summary (collapse)
-
- (Master) initialize
constructor
A new instance of Master.
- - (Object) receive
- - (Object) send(data)
Constructor Details
- (Master) initialize
A new instance of Master
350 351 352 |
# File 'lib/notifyhub.rb', line 350 def initialize @hub = NotifyHub.declare( :send, :receive, :na ) end |
Instance Attribute Details
- (Object) hub
Returns the value of attribute hub
348 349 350 |
# File 'lib/notifyhub.rb', line 348 def hub @hub end |
Instance Method Details
- (Object) receive
359 360 361 362 |
# File 'lib/notifyhub.rb', line 359 def receive @hub[ :receive ].notify( @data ) @data end |
- (Object) send(data)
354 355 356 357 |
# File 'lib/notifyhub.rb', line 354 def send( data ) @data = data @hub[ :send ].notify( @data ) end |