tapenade 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tapenade/module.rb +12 -5
- data/lib/tapenade/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41f5c37f195e39b0421b5c7c454c7b58d8b11f26906109ce6dfdc26f67acabf4
|
4
|
+
data.tar.gz: 0b6ded076408ab0f4cc1ebd40c0e50d5f04610905fbd28de3fc2b1337a6b2adb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e461aca12b3d477ebd413b0e336a3ab1eb1f3e668756639053cd7ab6bc469712fb3c9ea19b3387e9bd624b31e047a0897ba8f330a037bcb15ca5710a56e3e693
|
7
|
+
data.tar.gz: 32b8fb3ea8483dc439c1db1e3540d9766f5ed0c629ed4e7e0379ab4499b9709096d6ee67cf7ce8831678894ecea9ddff53bf24c674abfaacc2876a81f0a79b18
|
data/lib/tapenade/module.rb
CHANGED
@@ -9,11 +9,18 @@ module Tapenade
|
|
9
9
|
respond_to_tapenade?(method) || super
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
if RUBY_VERSION >= "2.7.0"
|
13
|
+
def method_missing(method, *args, **kwargs, &block)
|
14
|
+
return super unless respond_to_tapenade?(method)
|
15
|
+
public_send(method.to_s[Tapenade.prefix.length..-1], *args, **kwargs, &block)
|
16
|
+
self
|
17
|
+
end
|
18
|
+
else
|
19
|
+
def method_missing(method, *args, &block)
|
20
|
+
return super unless respond_to_tapenade?(method)
|
21
|
+
public_send(method.to_s[Tapenade.prefix.length..-1], *args, &block)
|
22
|
+
self
|
23
|
+
end
|
17
24
|
end
|
18
25
|
|
19
26
|
def respond_to_tapenade?(method)
|
data/lib/tapenade/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapenade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoit MARTIN-CHAVE
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Want to call a method and return self instead of normal return ? Just
|
14
14
|
prefix it with tap_ !
|