hash_map_hash 1.0.2 → 1.0.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hash_map_hash.rb +2 -8
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 32cc055886ef5749e1f40455013add3a41aed504
4
- data.tar.gz: dfb5ee30ddc5a73fc83ff6295aeb832288c19e62
3
+ metadata.gz: 480f59b8785254db66b8bc4690db384d18aabead
4
+ data.tar.gz: 6c0151ca812c3fa924ffc2f6e312479d31992d63
5
5
  SHA512:
6
- metadata.gz: 06b07a40169173c69b6489d3cbb840ea6e21d893ef41c5d0360212d417e379e11cefe801bf9e3fe964170cbb4eac54e3446691ea3ba14e5b1796ba449c69103d
7
- data.tar.gz: b3e999dfb04a46b16191df04c4f9c44177a40cb23bd846d6fc29f511051c527090776f9fab2076861951ab998f0eefc6f8517084493a1b4c82abf119b0e5d2fd
6
+ metadata.gz: 829221d82a46b296a5ced38449f5250f766035067f85bc1e5ec3a231829ee19a14108efdda83ebfb96d5662ea3655960079368e751d4e9ee602431b2a80a9e17
7
+ data.tar.gz: 12603209c771a9ea2c673571ba44022c88608ae1680a943321819cb1485807e54dce695175dd275ad4e7ba0ddbbf4ba58e843645a4a5c9cdbcced4df7f327a34
data/lib/hash_map_hash.rb CHANGED
@@ -1,14 +1,8 @@
1
1
  class HashMapHash
2
- module DeepDup
3
- def deep_dup
4
- Marshal.load(Marshal.dump(self))
5
- end
6
- end
7
-
8
2
  attr_reader :mapping
9
3
 
10
4
  def initialize(mapping)
11
- @mapping = mapping.extend(DeepDup)
5
+ @mapping = mapping
12
6
  end
13
7
 
14
8
  # Data sample (source_data)
@@ -50,7 +44,7 @@ class HashMapHash
50
44
  # summ: 123.45
51
45
  # }
52
46
  def map(source_data)
53
- mapping.deep_dup.each_with_object({}) do |(attribute_key, attribute_mapping), result|
47
+ mapping.dup.each_with_object({}) do |(attribute_key, attribute_mapping), result|
54
48
  result[attribute_key] = filtered_deep_fetch source_data, Array(attribute_mapping)
55
49
  end
56
50
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_map_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Peplin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-14 00:00:00.000000000 Z
11
+ date: 2015-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -31,7 +31,7 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
  files:
33
33
  - lib/hash_map_hash.rb
34
- homepage: http://github.com/denispeplin/hash_map_hash
34
+ homepage: http://github.com/7Pikes/hash_map_hash
35
35
  licenses:
36
36
  - MIT
37
37
  metadata: {}