Skip to content

zeevallin/key_smith

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KeySmith

Convenient when some keys just aren't the way you want them to.

Installation

Add this line to your application's Gemfile:

gem 'key_smith'

And then execute

$ bundle

Or install it yourself as:

$ gem install key_smith

Usage

Get started by requiring the library.

require "key_smith"

Translate

Translate key names using a map with #translate or #translate!

hash = { :mid => "56632", :manDate => "2011-01-01" }
hash.translate mid: :machine_id, manDate: :manufactured_at
# => { machine_id: "56632", manufactured_at: "2011-01-01" }

About

Tools for modifying hash keys.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages