class Ginko::Branch
Attributes
bank_code[R]
code[R]
name[R]
name_e[R]
name_h[R]
name_k[R]
name_kana[R]
routing_number[R]
Public Class Methods
new(branch_hash={})
click to toggle source
# File lib/ginko/branch.rb, line 7 def initialize(branch_hash={}) @bank_code = branch_hash['bank_code'] @code = branch_hash['code'] @name = branch_hash['name'] @name_h = branch_hash['name_h'] @name_k = branch_hash['name_k'] @name_e = branch_hash['name_e'] @routing_number = @bank_code + @code end
Public Instance Methods
fetch(key)
click to toggle source
# File lib/ginko/branch.rb, line 29 def fetch(key) self.respond_to?(key) ? self.send(key) : nil end
to_h()
click to toggle source
# File lib/ginko/branch.rb, line 17 def to_h { bank_code: @bank_code, code: @code, name: @name, name_h: @name_h, name_k: @name_k, name_e: @name_e, routing_number: @routing_number } end
to_json()
click to toggle source
# File lib/ginko/branch.rb, line 33 def to_json to_h.to_json end