hashable 0.1.0 → 0.1.1

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.
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Hashable
2
+ [![Build Status](https://travis-ci.org/mustafaturan/hashable.png)](https://travis-ci.org/mustafaturan/hashable) [![Code Climate](https://codeclimate.com/github/mustafaturan/hashable.png)](https://codeclimate.com/github/mustafaturan/hashable)
2
3
 
3
- Makes objects to hash recursively.
4
+ Recursively convert your objects into nested hashes.
4
5
 
5
6
  ## Installation
6
7
 
@@ -14,18 +14,20 @@ module Hashable
14
14
  protected
15
15
  # nodoc
16
16
  def convert_hash_values(hash)
17
+ new_hash = {}
17
18
  hash.each do |key, val|
18
- hash[key] = deeply_to_hash(val)
19
+ new_hash[key] = deeply_to_hash(val)
19
20
  end
20
- hash
21
+ new_hash
21
22
  end
22
23
 
23
24
  # nodoc
24
25
  def convert_array_values(array)
26
+ new_array = []
25
27
  array.each_index do |index|
26
- array[index] = deeply_to_hash(array[index])
28
+ new_array[index] = deeply_to_hash(array[index])
27
29
  end
28
- array
30
+ new_array
29
31
  end
30
32
 
31
33
  # nodoc
@@ -1,3 +1,3 @@
1
1
  module Hashable
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-10 00:00:00.000000000 Z
12
+ date: 2013-07-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler