Class: CollegeAccount

Inherits:
Object
  • Object
show all
Includes:
Fundable
Defined in:
lib/college_account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#amountObject

Returns the value of attribute amount.



5
6
7
# File 'lib/college_account.rb', line 5

def amount
  @amount
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/college_account.rb', line 6

def name
  @name
end

#targetObject

Returns the value of attribute target.



5
6
7
# File 'lib/college_account.rb', line 5

def target
  @target
end