🏣 Convert from zip-code to japan address (included Roman address)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
data
lib
spec
.gitignore
.rspec
.rubocop.yml Skip rubocop Security/Open Apr 24, 2018
.rubocop_todo.yml
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile varsion 0.1.0 Apr 7, 2016
jp_zip_code.gemspec

README.md

JpZipCode

Gem Version Build Status Test Coverage Code Climate

convert from zip-code to japan address (include Roman address)

Installation

Add this line to your application's Gemfile:

gem 'jp_zip_code'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jp_zip_code

Usage

address = JpZipCode.search '100-0001'

address['pref_code']     # => '13'
address['pref_kanji']    # => '東京都'
address['city_kanji']    # => '千代田区'
address['town_kanji']    # => '千代田'
address['pref_kana']     # => 'トウキョウト'
address['city_kana']     # => 'チヨダク'
address['town_kana']     # => 'チヨダ'
address['pref_roman']    # => 'Tokyo-To'
address['city_roman']    # => 'Chiyoda-Ku'
address['town_roman']    # => 'Chiyoda'
address['zip_code']      # => '1000001'

JpZipCode.update         # update json file

License

The gem is available as open source under the terms of the MIT License.