Class: Financial::Deposits

Inherits:
Array
  • Object
show all
Defined in:
lib/financial/deposits.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account_name) ⇒ Deposits

Returns a new instance of Deposits.



4
5
6
7
# File 'lib/financial/deposits.rb', line 4

def initialize()
  @account_name = 
  super()
end

Instance Attribute Details

#account_nameObject (readonly)

Returns the value of attribute account_name.



3
4
5
# File 'lib/financial/deposits.rb', line 3

def 
  @account_name
end

Instance Method Details

#deposit(value) ⇒ Object



9
10
11
12
13
# File 'lib/financial/deposits.rb', line 9

def deposit(value)
  deposit = Deposit.new(value, @account_name)
  self.push(deposit)
  deposit
end