kim 0.0.1 → 0.0.2

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 (5) hide show
  1. data/README +11 -0
  2. data/README.md +11 -0
  3. data/lib/kim/hash.rb +3 -3
  4. data/lib/kim/version.rb +1 -1
  5. metadata +5 -3
data/README ADDED
@@ -0,0 +1,11 @@
1
+ Kim
2
+ ===
3
+
4
+ This is just a compilation of all some frequent includes I do on my ruby code
5
+
6
+ Hash
7
+ ----
8
+
9
+ ### Hash: deep_merge
10
+
11
+ When merging Hashes it will take care of merging nested hashes
data/README.md ADDED
@@ -0,0 +1,11 @@
1
+ Kim
2
+ ===
3
+
4
+ This is just a compilation of all some frequent includes I do on my ruby code
5
+
6
+ Hash
7
+ ----
8
+
9
+ ### Hash: deep_merge
10
+
11
+ When merging Hashes it will take care of merging nested hashes
data/lib/kim/hash.rb CHANGED
@@ -4,9 +4,9 @@ module Kim
4
4
  merge_method = bang ? :merge! : :merge
5
5
  other.inject(self) do | result, item |
6
6
  key, value = item
7
- self.__send__ merge_method, (
8
- if has_key? key and self[key].is_a? Hash and value.is_a? Hash
9
- { key => self[key].deep_merge(value) }
7
+ result.__send__ merge_method, (
8
+ if has_key? key and result[key].is_a? Hash and value.is_a? Hash
9
+ { key => result[key].deep_merge(value) }
10
10
  else
11
11
  other
12
12
  end
data/lib/kim/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kim
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kim
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Giancarlo Palavicini
@@ -30,6 +30,8 @@ extra_rdoc_files: []
30
30
  files:
31
31
  - .gitignore
32
32
  - Gemfile
33
+ - README
34
+ - README.md
33
35
  - Rakefile
34
36
  - kim.gemspec
35
37
  - lib/kim.rb