Class: ObjectsFramework::PubSub::Channel

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channelName) ⇒ Channel

Returns a new instance of Channel.



52
53
54
55
# File 'lib/objectsframework/pubsub.rb', line 52

def initialize(channelName)
	@channelName = ""
	@sockets = []
end

Instance Attribute Details

#socketsObject

Returns the value of attribute sockets.



50
51
52
# File 'lib/objectsframework/pubsub.rb', line 50

def sockets
  @sockets
end

Instance Method Details

#send(message) ⇒ Object



58
59
60
61
62
# File 'lib/objectsframework/pubsub.rb', line 58

def send(message)
	@sockets.each do |socket|
		socket.send_data message
	end
end