mirroring_test 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mirroring_test.rb +17 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 257f84450a88b161b2b8289bb154d8c687186138b07d0ad44791a846dd07a8b6
|
4
|
+
data.tar.gz: bd9d2ab10d68a23f738f8c620e9d588e9d5f8bb5514c48cffd43b0b53597602f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06110ffa9eefb7fc1da3a1455a7a74f045e1334dc4d90e5e942c6aaf48499cfb4fe1c339736f6c90bd0bc14f50b01855b1abab9262cc92ac4f12cdf129980fe0
|
7
|
+
data.tar.gz: a18d5d1cc91db0740b21ede163463933878668e2f0680aa6055c053c59c823153bd55ea3566a6dae4c73667c5dcf3ae52b6e5e3a7521e8b10b76b18631539e3e
|
data/lib/mirroring_test.rb
CHANGED
@@ -19,10 +19,24 @@ class MirroringTest
|
|
19
19
|
|
20
20
|
private
|
21
21
|
|
22
|
-
def method_missing(method_name, *args, &block)
|
23
|
-
@receivers.map do |r|
|
24
|
-
|
22
|
+
def method_missing(method_name, *args, &block)
|
23
|
+
first_ret_pair = @receivers.map do |r|
|
24
|
+
ret = [nil, nil]
|
25
|
+
|
26
|
+
next(ret) unless r.respond_to?(method_name)
|
27
|
+
|
28
|
+
begin
|
29
|
+
ret[0] = r.send(method_name, *args, &block)
|
30
|
+
rescue StandardError => e
|
31
|
+
ret[1] = e
|
32
|
+
end
|
33
|
+
|
34
|
+
ret
|
25
35
|
end.first
|
36
|
+
|
37
|
+
raise(first_ret_pair[1]) unless first_ret_pair[1].nil?
|
38
|
+
|
39
|
+
first_ret_pair[0]
|
26
40
|
end
|
27
41
|
|
28
42
|
def respond_to_missing?(symbol, include_private)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mirroring_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Taishi Kasuga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Call a same method for multiple receivers
|
14
14
|
email: supercaracal@yahoo.co.jp
|