Class: Bank
- Inherits:
-
Object
show all
- Defined in:
- lib/cartolify/bank.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(bank_class, bank_account) ⇒ Bank
Returns a new instance of Bank.
4
5
6
7
|
# File 'lib/cartolify/bank.rb', line 4
def initialize(bank_class, bank_account)
require "cartolify/banks/#{bank_class.downcase}_bank"
@branch = Object.const_get("#{bank_class.upcase}Bank").new(bank_account)
end
|
Instance Attribute Details
#branch ⇒ Object
Returns the value of attribute branch.
2
3
4
|
# File 'lib/cartolify/bank.rb', line 2
def branch
@branch
end
|
Instance Method Details
#balance ⇒ Object
13
14
15
|
# File 'lib/cartolify/bank.rb', line 13
def balance
@branch.balance
end
|
#session ⇒ Object
17
18
19
|
# File 'lib/cartolify/bank.rb', line 17
def session
@branch.session
end
|
#transactions ⇒ Object
21
22
23
|
# File 'lib/cartolify/bank.rb', line 21
def transactions
@branch.transactions
end
|
#url ⇒ Object
9
10
11
|
# File 'lib/cartolify/bank.rb', line 9
def url
@branch.url
end
|