Class: XRBP::WebSocket::Parallel::All

Inherits:
Object
  • Object
show all
Defined in:
lib/xrbp/websocket/multi/parallel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#connectionsObject

Returns the value of attribute connections.



7
8
9
# File 'lib/xrbp/websocket/multi/parallel.rb', line 7

def connections
  @connections
end