blabbermouth 0.0.9 → 0.0.10
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9abf3787698d87b528007f57075122fc4c44580
|
4
|
+
data.tar.gz: 58c413c9a852bc2a33be2d850ca5e08e17afd9f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16ca8eb7dd2a70024983643958e3a6cbfb29772df00e9faa0e5a00d026c72f7e9980552c691f571fdc82b2514aaf5c9725dda67cb37008ee1133427541be2263
|
7
|
+
data.tar.gz: 62fbdb858e734d036bc62f689aa95d9caae6841b99fe2103dcd6b234b683a51962e2c7064a4b4809f24fceed51b625d9cea7de28f199ae03240b59d901c226e8
|
@@ -3,8 +3,12 @@ module Blabbermouth
|
|
3
3
|
module DynamicEvents
|
4
4
|
EXCLUDES = [:flush]
|
5
5
|
|
6
|
+
def relay(meth, key, *args)
|
7
|
+
raise NotImplementedError, "#{self.class.name}##{__method__} has not been implemented"
|
8
|
+
end
|
9
|
+
|
6
10
|
def method_missing(meth, *args)
|
7
|
-
|
11
|
+
relay meth, *args
|
8
12
|
end
|
9
13
|
|
10
14
|
def respond_to_missing?(meth, include_private=false)
|
@@ -5,26 +5,26 @@ module Blabbermouth
|
|
5
5
|
include Blabbermouth::Bystanders::DynamicEvents
|
6
6
|
|
7
7
|
def error(key, e, *args)
|
8
|
-
|
8
|
+
relay :error, key, e, *args
|
9
9
|
end
|
10
10
|
|
11
11
|
def info(key, msg=nil, *args)
|
12
|
-
|
12
|
+
relay :info, key, msg, *args
|
13
13
|
end
|
14
14
|
|
15
15
|
def increment(key, by=1, *args)
|
16
|
-
|
16
|
+
relay :increment, key, by, *args
|
17
17
|
end
|
18
18
|
|
19
19
|
def count(key, total, *args)
|
20
|
-
|
20
|
+
relay :count, key, total, *args
|
21
21
|
end
|
22
22
|
|
23
23
|
def time(key, duration, *args)
|
24
|
-
|
24
|
+
relay :time, key, duration, *args
|
25
25
|
end
|
26
26
|
|
27
|
-
def
|
27
|
+
def relay(meth, key, *args)
|
28
28
|
data, opts, args = parse_args(*args)
|
29
29
|
puts meth, key, args.first, data
|
30
30
|
end
|
data/lib/blabbermouth/version.rb
CHANGED