class TurkishBanks::Bank
Attributes
address[R]
city[R]
code[R]
name[R]
Public Class Methods
new(bank_name)
click to toggle source
# File lib/turkish_banks/bank.rb, line 5 def initialize(bank_name) bank_params = TurkishBanks.get_bank_params(bank_name) @name = bank_params['bAd'] @code = bank_params['bKd'] @city = bank_params['bIlAd'] @address = bank_params['adr'] end
Public Instance Methods
branches()
click to toggle source
# File lib/turkish_banks/bank.rb, line 13 def branches nodes = TurkishBanks::DOC.xpath("//sube[bKd= '#{@code}']") nodes.map do |node| branch_params = Hash.from_xml(node.to_s)['sube'] TurkishBanks::Branch.new(branch_params) end end