fancybox2 0.0.10 → 0.0.11
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/lib/fancybox2/core_ext/hash.rb +19 -0
- data/lib/fancybox2/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: dc475914503d3c657627de5c2521c7eaa8e68e428c88f37ecda63632715f2333
|
4
|
+
data.tar.gz: e3bafe05ad157a0387aa481dcf891aaa0ba6d2d516c0ccfd59aa393d489893a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7405825f913d995cf332bc33c954e9eb432ba3109ec1e69518e4550f6113ebfbdc4c5b9788202169f9bd70a6ecbbb94b14214bad3e85c1422a59b180a8fb58c2
|
7
|
+
data.tar.gz: c50bd9c0898cebba2cdb841cac4a195e02ebc7290519041112c9f89c605c7e9cf7cd6046c6f652033debe0e2e140b9f01ea58fb9e7355511d7d097735873282e
|
@@ -2,6 +2,25 @@
|
|
2
2
|
|
3
3
|
# :nocov:
|
4
4
|
class Hash
|
5
|
+
# Returns a new hash with all values converted by the block operation.
|
6
|
+
# This includes the values from the root hash and from all
|
7
|
+
# nested hashes and arrays.
|
8
|
+
#
|
9
|
+
# hash = { person: { name: 'Rob', age: '28' } }
|
10
|
+
#
|
11
|
+
# hash.deep_transform_values{ |value| value.to_s.upcase }
|
12
|
+
# # => {person: {name: "ROB", age: "28"}}
|
13
|
+
def deep_transform_values(&block)
|
14
|
+
_deep_transform_values_in_object(self, &block)
|
15
|
+
end
|
16
|
+
|
17
|
+
# Destructively converts all values by using the block operation.
|
18
|
+
# This includes the values from the root hash and from all
|
19
|
+
# nested hashes and arrays.
|
20
|
+
def deep_transform_values!(&block)
|
21
|
+
_deep_transform_values_in_object!(self, &block)
|
22
|
+
end
|
23
|
+
|
5
24
|
# Returns a new hash with all keys converted using the block operation.
|
6
25
|
#
|
7
26
|
# hash = { name: 'Rob', age: '28' }
|
data/lib/fancybox2/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fancybox2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Verlato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|