Class: TurkishBanks::Bank

Inherits:
TurkishBank show all
Defined in:
lib/turkish_banks/bank.rb

Constant Summary

Constants inherited from TurkishBank

TurkishBank::BANKS_URL

Instance Attribute Summary collapse

Attributes inherited from TurkishBank

#banks, #last_update_date

Instance Method Summary collapse

Methods inherited from TurkishBank

#get_branches_of, #get_information_of

Constructor Details

#initialize(bank) ⇒ Bank

Returns a new instance of Bank.



5
6
7
8
9
10
# File 'lib/turkish_banks/bank.rb', line 5

def initialize(bank)
  @name    = bank["bAd"]
  @code    = bank["bKd"]
  @city    = bank["bIlAd"]
  @address = bank["adr"]
end

Instance Attribute Details

#addressObject

Returns the value of attribute address.



3
4
5
# File 'lib/turkish_banks/bank.rb', line 3

def address
  @address
end

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/turkish_banks/bank.rb', line 3

def city
  @city
end

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/turkish_banks/bank.rb', line 3

def code
  @code
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/turkish_banks/bank.rb', line 3

def name
  @name
end