Class: Master

Inherits:
Object
  • Object
show all
Defined in:
lib/notifyhub.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

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