Module: Fundable

Included in:
CollegeAccount, Pr::Project
Defined in:
lib/fundable.rb

Instance Method Summary collapse

Instance Method Details

#fully_funded?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/fundable.rb', line 13

def fully_funded?
  total_funding_outstanding <= 0
end

#gotObject



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

def got
  @amount += 25
 puts "Project #{@name} lost some founds !"
end

#lostObject



2
3
4
5
# File 'lib/fundable.rb', line 2

def lost
  @amount -= 15
 puts "Project #{@name} lost some founds !"
end

#total_funding_outstandingObject



10
11
12
# File 'lib/fundable.rb', line 10

def total_funding_outstanding
  @target - total_funds
end