Class: CollegeAccount
- Inherits:
-
Object
- Object
- CollegeAccount
- Includes:
- Fundable
- Defined in:
- lib/college_account.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#name ⇒ Object
Returns the value of attribute name.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(name, amount = 0, target = 3000) ⇒ CollegeAccount
constructor
A new instance of CollegeAccount.
Methods included from Fundable
#fully_funded?, #got, #lost, #total_funding_outstanding
Constructor Details
#initialize(name, amount = 0, target = 3000) ⇒ CollegeAccount
Returns a new instance of CollegeAccount.
8 9 10 11 12 13 |
# File 'lib/college_account.rb', line 8 def initialize(name,amount=0,target=3000) @name = name.capitalize @amount = amount @target = target end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
5 6 7 |
# File 'lib/college_account.rb', line 5 def amount @amount end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/college_account.rb', line 6 def name @name end |
#target ⇒ Object
Returns the value of attribute target.
5 6 7 |
# File 'lib/college_account.rb', line 5 def target @target end |