Class: TurkishBanks::Branch

Inherits:
TurkishBank show all
Defined in:
lib/turkish_banks/branch.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(branch) ⇒ Branch



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

def initialize(branch)
  @name      = branch["sAd"]
  @code      = branch["sKd"]
  @bank_code = branch["bKd"]
  @city      = branch["bIlAd"]
end

Instance Attribute Details

#bank_codeObject

Returns the value of attribute bank_code.



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

def bank_code
  @bank_code
end

#cityObject

Returns the value of attribute city.



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

def city
  @city
end

#codeObject

Returns the value of attribute code.



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

def code
  @code
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end