Method: IO::Endpoint::CompositeEndpoint#initialize

Defined in:
lib/io/endpoint/composite_endpoint.rb

#initialize(endpoints, **options) ⇒ CompositeEndpoint

Initialize a new composite endpoint.



14
15
16
17
18
19
20
21
22
23
# File 'lib/io/endpoint/composite_endpoint.rb', line 14

def initialize(endpoints, **options)
  super(**options)
  
  # If any options were provided, propagate them to the endpoints:
  if options.any?
    endpoints = endpoints.map{|endpoint| endpoint.with(**options)}
  end
  
  @endpoints = endpoints
end