SimpleZipCode
Super lightweight solution to get a US state abbreviation from a valid zip code!
Installation
Add this line to your application's Gemfile:
gem 'simple_zip_code'
And then execute:
$ bundle
Or install it yourself as:
$ gem install simple_zip_code
Usage
us_state = SimpleZipCode::DeduceState.get_state_from_zip(98230) # valid zip integer
p us_state
> "WA"
# ...that's all there is
Contributing
- Fork it ( https://github.com/[my-github-username]/simple_zip_code/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request