protip 0.31.1 → 0.31.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/protip/decorator.rb +9 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b35614f55f597e8e948d974a52573d1b876f9e3
|
4
|
+
data.tar.gz: 39dabf379cbc2183bbd5128a6170b849298bb382
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc265d64daf5816ad03aec686e95a5e9125a26918c187e97793085e1198e9ff6c85012e2b8407187414fdf6a8b9d35ae85041125e8c7b2f46348e648549fc2dd
|
7
|
+
data.tar.gz: dfc5f0815cd9322452afa942dd8f6555bec87c8c47c04a7a659d58252ec1ab74db23b629d8cf7499c55275ce604f427d472733db90023c0f791100880491359c
|
data/lib/protip/decorator.rb
CHANGED
@@ -22,19 +22,17 @@ module Protip
|
|
22
22
|
"<#{self.class.name}(#{transformer.class.name}) #{message.inspect}>"
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
26
|
-
if super
|
27
|
-
true
|
28
|
-
else
|
29
|
-
# Responds to calls to oneof groups by name
|
30
|
-
return true if message.class.descriptor.lookup_oneof(name.to_s)
|
25
|
+
def respond_to_missing?(name, *)
|
26
|
+
return true if super
|
31
27
|
|
32
|
-
|
33
|
-
|
34
|
-
return false if !field
|
28
|
+
# Responds to calls to oneof groups by name
|
29
|
+
return true if message.class.descriptor.lookup_oneof(name.to_s)
|
35
30
|
|
36
|
-
|
37
|
-
|
31
|
+
# Responds to field getters, setters, and query methods for all fieldsfa
|
32
|
+
field = message.class.descriptor.lookup(name.to_s.gsub(/[=?]$/, ''))
|
33
|
+
return true if field
|
34
|
+
|
35
|
+
false
|
38
36
|
end
|
39
37
|
|
40
38
|
def method_missing(name, *args)
|