io-endpoint 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/io/endpoint/composite_endpoint.rb +10 -0
- data/lib/io/endpoint/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3e2f94c163119fe780d312df9546a2d1f8d844748ecb97562a67625c52922ad
|
4
|
+
data.tar.gz: b8c061943bb548bfda2ed77ef5b8e7a7ede3238b34fbbb9e884d28b29b086a03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d89be8e49597e1af88ab58caca2fd12ccc4d2214cc70a7f4ec1c5b746c32a4a8941b6d96cc3e621af4a89eb894e64ceea61d8a0834286ca12eb243a34498d56
|
7
|
+
data.tar.gz: 2ab3e03a9986203526c8e78e76538b5e3ca45c47bb0222008b1acb94031d2838309f391a3e730f534db4409d31982e8d6faaac0cea86e4d17f28d61f06271de5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -10,9 +10,19 @@ module IO::Endpoint
|
|
10
10
|
class CompositeEndpoint < Generic
|
11
11
|
def initialize(endpoints, **options)
|
12
12
|
super(**options)
|
13
|
+
|
14
|
+
# If any options were provided, propagate them to the endpoints:
|
15
|
+
if options.any?
|
16
|
+
endpoints = endpoints.map{|endpoint| endpoint.with(**options)}
|
17
|
+
end
|
18
|
+
|
13
19
|
@endpoints = endpoints
|
14
20
|
end
|
15
21
|
|
22
|
+
def with(**options)
|
23
|
+
self.class.new(endpoints.map{|endpoint| endpoint.with(**options)}, **@options.merge(options))
|
24
|
+
end
|
25
|
+
|
16
26
|
attr :endpoints
|
17
27
|
|
18
28
|
# The number of endpoints in the composite endpoint.
|
data/lib/io/endpoint/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|