hash_map 0.6.2 → 0.6.3
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/hash_map/mapper.rb +2 -1
- data/lib/hash_map/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c52cbfa518e9b8375e794d0621215b366e42c4c6d384eac93d557ef39845700
|
4
|
+
data.tar.gz: d9b476385b93fb0c9b7a6213afca9cd37ab8367f69df954417e5af67c081ddd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc2937bc843ff8dffd9dfb7c3f2541a4869228452f4e552b7dd2dbb49c36d0c0f4e61596445be3d851b6a1cec1ec5a2993a47054ccd2c010ebba129487a103fb
|
7
|
+
data.tar.gz: 4f5e3aab2e6d7a49ae9f028668ccbdc2573e1fe20528f69004f11b97747392239355e7458cca2e8dfa15d0a298453a540920f8f376ccf781e1baee17f9d19844
|
data/lib/hash_map/mapper.rb
CHANGED
@@ -18,6 +18,7 @@ module HashMap
|
|
18
18
|
private
|
19
19
|
|
20
20
|
def get_value(struct)
|
21
|
+
|
21
22
|
value = if struct[:is_collection]
|
22
23
|
map_collection(struct)
|
23
24
|
elsif struct[:proc]
|
@@ -44,7 +45,7 @@ module HashMap
|
|
44
45
|
def map_collection(struct)
|
45
46
|
value = get_value_from_key(struct)
|
46
47
|
value = Fusu::Array.wrap(value)
|
47
|
-
value.map { |elem| struct[:mapper].call(elem) }
|
48
|
+
value.map { |elem| struct[:mapper].call(elem, hash_map.options) }
|
48
49
|
end
|
49
50
|
|
50
51
|
def get_value_from_key(struct, from = :from)
|
data/lib/hash_map/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hash_map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artur Pañach
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -115,8 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
requirements: []
|
118
|
-
|
119
|
-
rubygems_version: 2.7.6
|
118
|
+
rubygems_version: 3.0.3
|
120
119
|
signing_key:
|
121
120
|
specification_version: 4
|
122
121
|
summary: Library to map easily hashes.
|