prefixed_delegation 0.1.1 → 0.1.2
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/Gemfile.lock +1 -1
- data/lib/prefixed_delegation/methods.rb +2 -2
- data/lib/prefixed_delegation/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: 9182dfee9f5e369c053e7e5df5a843e46e1f9d1e200f03edbab7c8e3b621d919
|
|
4
|
+
data.tar.gz: 9a1925119bd37649786d3b9c4f4f5c6cafb560fa92a0bf249f0de5e3ef9391d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 895376709998817e2ed3b3e0d7d044a75283aa03937761267b8dadbf11cd6f003155d67693a12cb5fb99115a4f6697c72e5057e7c5f1d1adaabd35afee29cae6
|
|
7
|
+
data.tar.gz: 72e419876eb6a80983f2a4b2bbc1b809a4e4ac0b5263a20c9b6655f714c3a763d2f1e8751908b0d2b13fe79c8732890cce5480749774e40ca568be8ef61f3ba3
|
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
module PrefixedDelegation
|
|
2
2
|
module Methods
|
|
3
3
|
def delegate(*methods, to: nil, prefix: nil, allow_nil: nil, private: nil, prefixed: nil)
|
|
4
|
-
return super(*methods, to:
|
|
5
|
-
return super(*methods, to:
|
|
4
|
+
return super(*methods, to: to, prefix: prefix, allow_nil: allow_nil, private: private) unless to
|
|
5
|
+
return super(*methods, to: to, prefix: prefix, allow_nil: allow_nil, private: private) unless prefixed
|
|
6
6
|
|
|
7
7
|
method_prefixed_by = "#{prefixed == true ? to : prefixed}_"
|
|
8
8
|
substituted_methods = methods.map { |x| x.to_s.sub(/^#{method_prefixed_by}/, '').to_sym }
|