Class: ObjectsFramework::PubSub::Channel
- Inherits:
-
Object
- Object
- ObjectsFramework::PubSub::Channel
- Defined in:
- lib/objectsframework/pubsub.rb
Instance Attribute Summary collapse
-
#sockets ⇒ Object
Returns the value of attribute sockets.
Instance Method Summary collapse
-
#initialize(channelName) ⇒ Channel
constructor
A new instance of Channel.
- #send(message) ⇒ Object
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
#sockets ⇒ Object
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() @sockets.each do |socket| socket.send_data end end |