项目作者: yu123

项目描述 :
ruby library for Japanese banks
高级语言: Ruby
项目地址: git://github.com/yu123/ginko.git
创建时间: 2017-03-29T07:27:49Z
项目社区:https://github.com/yu123/ginko

开源协议:MIT License

下载


Ginko

A library to search Japanese banks and branches for Ruby

Build Status

Renamed

Previously called jp-bank

Feature

  • comprehensive list of Japanese banks and their branches

Installation

Add this line to your application’s Gemfile:

  1. gem 'ginko'
  2. And then execute:
  3. $ bundle
  4. Or install it yourself as:
  5. $ gem install ginko
  6. ## Usage
  7. ### search banks
  8. ```ruby
  9. Ginko::Bank.search('みつい')
  10. # => [#<Ginko::Bank:0x007fcd9570eb48 @code="0009", @name="三井住友", @name_e="mitsuisumitomo", @name_h="みついすみとも", @name_k="ミツイスミトモ">,
  11. #<Ginko::Bank:0x007fcd9570ead0 @code="0294", @name="三井住友信託", @name_e="mitsuisumitomoshintaku", @name_h="みついすみともしんたく", @name_k="ミツイスミトモシンタク">,
  12. #<Ginko::Bank:0x007fcd9570eaa8 @code="3126", @name="みついし農協", @name_e="mitsuishinoukiyou", @name_h="みついしのうきよう", @name_k="ミツイシノウキヨウ">]

find bank

  1. Ginko::Bank.find('9900')
  2. # => #<Ginko::Bank:0x007fcd956954c8 @code="9900", @name="ゆうちょ", @name_e="yuuchiyo", @name_h="ゆうちよ", @name_k="ユウチヨ">

search branches

  1. bank = Ginko::Bank.find('0009')
  2. bank.branches.search('新宿')
  3. # => [#<Ginko::Branch:0x007ff4463e87e8 @bank_code="0009", @code="221", @name="新宿", @name_e="shinjiyuku", @name_h="しんじゆく", @name_k="シンジユク", @routing_number="0009221">,
  4. #<Ginko::Branch:0x007ff4463e8798 @bank_code="0009", @code="259", @name="新宿西口", @name_e="shinjiyukunishiguchi", @name_h="しんじゆくにしぐち", @name_k="シンジユクニシグチ", @routing_number="0009259">,
  5. #<Ginko::Branch:0x007ff4463e8748 @bank_code="0009", @code="661", @name="新宿通", @name_e="shinjiyukudoori", @name_h="しんじゆくどおり", @name_k="シンジユクドオリ", @routing_number="0009661">]

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yu123/ginko. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

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