Class: XRBP::WebSocket::Parallel::All
- Inherits:
-
Object
- Object
- XRBP::WebSocket::Parallel::All
- Defined in:
- lib/xrbp/websocket/multi/parallel.rb
Instance Attribute Summary collapse
-
#connections ⇒ Object
Returns the value of attribute connections.
Instance Method Summary collapse
-
#initialize(connections) ⇒ All
constructor
A new instance of All.
- #method_missing(m, *args, &bl) ⇒ Object
Constructor Details
#initialize(connections) ⇒ All
Returns a new instance of All.
9 10 11 |
# File 'lib/xrbp/websocket/multi/parallel.rb', line 9 def initialize(connections) @connections = connections end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &bl) ⇒ Object
13 14 15 16 17 |
# File 'lib/xrbp/websocket/multi/parallel.rb', line 13 def method_missing(m, *args, &bl) connections.collect { |c| c.send(m, *args, &bl) if c.open? } end |
Instance Attribute Details
#connections ⇒ Object
Returns the value of attribute connections.
7 8 9 |
# File 'lib/xrbp/websocket/multi/parallel.rb', line 7 def connections @connections end |