tailog 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tailog/version.rb +1 -1
- data/lib/tailog/watch_methods.rb +15 -0
- 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: ddf6171d97f0768c334605909704196c9b390d7b
|
4
|
+
data.tar.gz: ee4aebfc0cb499bcca30e6c380e98c56cd3d38ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c2a04e4a0d9dc5c935fd6acc85b0e79330a5eebabbb4e697a13c1b9f2d8bc0776151895d7458ea62bd23f43d1e349ef0b611a847f73ed412190d53ffed6d589
|
7
|
+
data.tar.gz: 8642564b2328d80ab17e588b2388be561b7fbdc86a4d49a1b0e0fe80075d4cbcc6877439563e83052b05c8706112c6e2dc491108100043268783112d000a049a
|
data/lib/tailog/version.rb
CHANGED
data/lib/tailog/watch_methods.rb
CHANGED
@@ -52,6 +52,21 @@ module Tailog
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
def inject_constants targets
|
56
|
+
targets.each do |target|
|
57
|
+
begin
|
58
|
+
target.constantize.instance_methods(false).each do |method|
|
59
|
+
inject_instance_method "#{target}##{method}"
|
60
|
+
end
|
61
|
+
target.constantize.methods(false).each do |method|
|
62
|
+
inject_class_method "#{target}.#{method}"
|
63
|
+
end
|
64
|
+
rescue => error
|
65
|
+
WatchMethods.logger.error "Inject constant `#{target}' failed: #{error.class}: #{error.message}"
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
55
70
|
def inject_methods targets
|
56
71
|
targets.each do |target|
|
57
72
|
begin
|