JpBank
Provide mapping from bank codes to bank information
Installation
Add this line to your application's Gemfile:
gem 'jp_bank'
And then execute:
$ bundle
Or install it yourself as:
$ gem install jp_bank
Usage
require 'jp_bank'
bank = JpBank::Bank.find(36)
bank.name #=> "楽天銀行"
bank.code #=> "0036"
JpBank
module provides jp_bank
class method:
class Account
attr_reader :bank_code
jp_bank :bank
def initialize(args)
...
@bank_code = args[:bank_code]
...
end
end
account = Account.new(bank_code: '0036')
account.bank.name #=> '楽天銀行'
Contributing
- Fork it ( http://github.com//jp_bank/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 new Pull Request