active_object 5.8.10 → 5.8.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/active_object/object.rb +4 -0
- data/lib/active_object/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4048bbff49b6a24c4e9ab029efc0241bb0add2dd5fe584240ab0f07c104ddd94
|
4
|
+
data.tar.gz: e9151c19ef67880601f31a3d8dc412c1a7581501a98ec839986dd6ec6862792c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa7a4df71f2e05bea04c77885880944449abea2add7ac9dee549e8de327c3cb57711138a29beee3b1b09e4e246fc0205fe0d28b7f9c3f808c19afe3e3a6c1a73
|
7
|
+
data.tar.gz: 9152d040a4ae3ce9124940cc35fe4c682c3353c551c679a5e03992cc3036a74d533a9e7c45f1b079c50c0b509a5d41d45dd30de5abd8ac3d5e7766af8b524f66
|
data/README.md
CHANGED
@@ -1598,6 +1598,14 @@ callr.safe_call #=> raises ArgumentError: wrong number of arguments
|
|
1598
1598
|
3.safe_send(:+, 2) #=> 5
|
1599
1599
|
```
|
1600
1600
|
|
1601
|
+
**Safe Try:**
|
1602
|
+
`safe_try` similar to the try method but returns self instead of nil.
|
1603
|
+
|
1604
|
+
```ruby
|
1605
|
+
'example'.safe_try(:upcase) #=> 'EXAMPLE'
|
1606
|
+
'example'.safe_try(:fake_method) #=> 'example'
|
1607
|
+
```
|
1608
|
+
|
1601
1609
|
**Salvage:**
|
1602
1610
|
`salvage` returns a placeholder if object is blank?.
|
1603
1611
|
|
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.11
|
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-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
|
-
rubygems_version: 3.0.
|
172
|
+
rubygems_version: 3.0.3
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Gem for commonly used ruby object helpers.
|