key_smith 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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 47f0b5acc9e31227ed4051331187ac365d7706b0
4
- data.tar.gz: e970eb42ea7f12f20b67eda980f0575736c4d6e4
3
+ metadata.gz: 06e0d2248a8ddf973b72a8a35fb181a7913286b6
4
+ data.tar.gz: 161aebccfc6d1b8b7775ce6533425e6277e24a81
5
5
  SHA512:
6
- metadata.gz: e31992cc93be5b2832db24e2ba5eed1fddfae6806f69a6dbc2208f20cbe29022fbde95800f0c0ab4957bd71917222c7f22c29999721d996a173e49db99a80116
7
- data.tar.gz: a8044862b65f58acd498ac89fe08d08099fd0a1316ad625dc9363b29f79fd64d9f82d5ae1cff163efe0911ef2782cab34acba34f41bb40524af4b86392cdb28d
6
+ metadata.gz: ff9971f12ad9d9fc532886d703749cf58703eb585718b71df2e108493303761063546ba0a5fb4527b63a4d8faf9489f3878017d98d7380787f3c61c57e40fdc5
7
+ data.tar.gz: 9e619fea57f482acfbd5f7785a9c0485cdcf41d08450004f04aa451c00dd63a05b95af7f3b0b4e4211153694cbfea437623d6faa0f45bb2dcba2ae3b7eda6fef
File without changes
data/README.md CHANGED
@@ -28,23 +28,10 @@ require "key_smith"
28
28
  ```
29
29
 
30
30
  ### Translate
31
- Translate key names using a map.
31
+ Translate key names using a map with `#translate` or `#translate!`
32
32
 
33
33
  ```ruby
34
- hash = { :mid => "56632", manDate => "2011-01-01" }
35
- map = { mid: :machine_id, manDate: :manufactured_at }
36
-
37
- data.translate map
34
+ hash = { :mid => "56632", :manDate => "2011-01-01" }
35
+ hash.translate mid: :machine_id, manDate: :manufactured_at
38
36
  # => { machine_id: "56632", manufactured_at: "2011-01-01" }
39
- ```
40
-
41
- Translate on the same object
42
-
43
- ```ruby
44
- hash = { firstName: "Philip", lastName: "Vieira" }
45
- map = { firstName: :first_name, lastName: :last_name }
46
- hash.translate! map
47
-
48
- hash
49
- # => { first_name: "Philip", last_name: "Vieira" }
50
37
  ```
@@ -1,5 +1,4 @@
1
- require "key_smith/version"
2
- require "key_smith/translate"
3
-
4
1
  module KeySmith
2
+ require "key_smith/version"
3
+ require "key_smith/translate"
5
4
  end
@@ -1,3 +1,3 @@
1
1
  module KeySmith
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: key_smith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philip Vieira
@@ -62,7 +62,7 @@ files:
62
62
  - ".gitignore"
63
63
  - ".rspec"
64
64
  - Gemfile
65
- - LICENSE.txt
65
+ - LICENSE
66
66
  - README.md
67
67
  - Rakefile
68
68
  - key_smith.gemspec