who_delegated 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/who_delegated/activerecord/base.rb +6 -0
- data/lib/who_delegated/core_ext.rb +1 -1
- data/lib/who_delegated/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf163ab8caaa0c2f44dae80556d44f5dd33a3e68a456ede43d5bb3de41f4df6e
|
4
|
+
data.tar.gz: dcccb41c0ea2844e8d7b2aecb0419ee6577617a272782ddfc88af1d0c7769a68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ce5f1dba2a434efca960aabd5c5601ac3b9afe5392975e6dada16643d783b97e7e858e8b0fd055466610a4f0b9250289f0fd370ced4c282d65e74f0f093c5ea
|
7
|
+
data.tar.gz: 777a522054610bf29008925d8ca8d09e7eafe78adf403b7ba4ffb1553604b0e85ff2eea488feccddd1427f04a2b05c0ba7226f1c54c9db916ef54ef358f421ad
|
@@ -6,5 +6,11 @@ module ActiveRecord
|
|
6
6
|
def delegated_method?(method_name)
|
7
7
|
respond_to?("delegated_#{method_name}?") && send("delegated_#{method_name}?")
|
8
8
|
end
|
9
|
+
|
10
|
+
def delegated_target(method_name)
|
11
|
+
return unless delegated_method?(method_name)
|
12
|
+
|
13
|
+
send("delegated_#{method_name}?")
|
14
|
+
end
|
9
15
|
end
|
10
16
|
end
|