active_object 5.8.4 → 5.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.reek.yml +2 -0
- data/README.md +8 -0
- data/lib/active_object/kernel.rb +0 -2
- data/lib/active_object/object.rb +4 -0
- data/lib/active_object/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: d32aae93b64f1afb0192f9c0ef6b37cc9ce507c65ed4f8bcf7fddc471259d7ca
|
4
|
+
data.tar.gz: c7b08130c77ff1f6db7bf8ee30dfd0aed4077bd73168aea0e8c1a63a4cc289ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1043ad6c682e71c5cd6a93fc0534957112b646d9946908253d35fec65454007800e68047604b65ee1ec0c0ba64349b5aa39bd2a16b9b5e1439a6c9c270a007c
|
7
|
+
data.tar.gz: 47f590d4eaf88cdeece8ccc61417cf54402065f9d06e00b07176d5c3519506e03608725001385b35d0ae5427693521a7b098a67918b7e1640d6ba173039e1512
|
data/.reek.yml
CHANGED
data/README.md
CHANGED
@@ -1562,6 +1562,14 @@ true.falsey? #=> false
|
|
1562
1562
|
1.range? #=> false
|
1563
1563
|
```
|
1564
1564
|
|
1565
|
+
**Safe Send:**
|
1566
|
+
`safe_send` execute caller to an object and rescues with self.
|
1567
|
+
|
1568
|
+
```ruby
|
1569
|
+
3.safe_send(:fake) #=> 3
|
1570
|
+
3.safe_send(:to_s) #=> '3'
|
1571
|
+
```
|
1572
|
+
|
1565
1573
|
**Salvage:**
|
1566
1574
|
`salvage` returns a placeholder if object is blank?.
|
1567
1575
|
|
data/lib/active_object/kernel.rb
CHANGED
@@ -23,14 +23,12 @@ if ActiveObject.configuration.autoload_kernel
|
|
23
23
|
|
24
24
|
private
|
25
25
|
|
26
|
-
# rubocop:disable Style/PerlBackrefs
|
27
26
|
def caller_name(depth = 0)
|
28
27
|
val = caller[depth][CALLER_METHOD_REGEX, 1]
|
29
28
|
return val if depth.zero? || !val.include?('<top (required)>')
|
30
29
|
|
31
30
|
caller[depth - 1][CALLER_METHOD_REGEX, 1]
|
32
31
|
end
|
33
|
-
# rubocop:enable Style/PerlBackrefs
|
34
32
|
|
35
33
|
end
|
36
34
|
end
|
data/lib/active_object/object.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.8.
|
4
|
+
version: 5.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juan Gomez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|