Class: Financial::Deposits
- Inherits:
-
Array
- Object
- Array
- Financial::Deposits
- Defined in:
- lib/financial/deposits.rb
Instance Attribute Summary collapse
-
#account_name ⇒ Object
readonly
Returns the value of attribute account_name.
Instance Method Summary collapse
- #deposit(value) ⇒ Object
-
#initialize(account_name) ⇒ Deposits
constructor
A new instance of Deposits.
Constructor Details
#initialize(account_name) ⇒ Deposits
4 5 6 7 |
# File 'lib/financial/deposits.rb', line 4 def initialize(account_name) @account_name = account_name super() end |
Instance Attribute Details
#account_name ⇒ Object (readonly)
Returns the value of attribute account_name.
3 4 5 |
# File 'lib/financial/deposits.rb', line 3 def account_name @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 |