Project

jp_bank

0.0
No commit activity in last 3 years
No release in over 3 years
Provide mapping from bank code to bank information
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
~> 2.0
>= 0
 Project Readme

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

  1. Fork it ( http://github.com//jp_bank/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request