method_decorator 1.1.0 → 1.1.1
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
- data/lib/method_decorator.rb +5 -1
- data/lib/method_decorator/version.rb +1 -1
- 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: 0fcdf1d4b59e01c87c59636931c71bfce8c6a41b
|
4
|
+
data.tar.gz: 93b5ebb80f54dcf5567d28176fae0cbba72c5e5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 669cebd955590a633211a8a45e394ad42d7c1f12fc439586de5dcd513160feb2d6beef2d669071d0d938c179380da0bb8f96904d39089642f4b9e5839a23bcc4
|
7
|
+
data.tar.gz: 452e1139c1991f8d4d443f39fa68376cfd2d0b686676e584a1694dbadf498011d73c59b84d382579a6530abc729a84197069951c067a68002970620b9b2731f6
|
data/lib/method_decorator.rb
CHANGED
@@ -4,6 +4,8 @@ module MethodDecorator extend ActiveSupport::Concern
|
|
4
4
|
|
5
5
|
class << self
|
6
6
|
|
7
|
+
private
|
8
|
+
|
7
9
|
def decorate_method(target, &block)
|
8
10
|
original_method_name = original_method_name_for target
|
9
11
|
complex_method_name = decorated_method_name_for target
|
@@ -23,8 +25,10 @@ module MethodDecorator extend ActiveSupport::Concern
|
|
23
25
|
|
24
26
|
end
|
25
27
|
|
28
|
+
private
|
29
|
+
|
26
30
|
def call_original_method(target, *args, &block)
|
27
|
-
original_method_name = self.singleton_class.original_method_name_for target
|
31
|
+
original_method_name = self.singleton_class.send :original_method_name_for, target
|
28
32
|
send original_method_name, *args, &block
|
29
33
|
end
|
30
34
|
|