module Crowdfund::Fundable

Public Instance Methods

add(donation=25) click to toggle source
# File lib/crowdfund/fundable.rb, line 3
def add(donation=25)
    @funds = @funds + donation
    puts "Project #{@name} got more funds!"
end
fully_funded?() click to toggle source
# File lib/crowdfund/fundable.rb, line 18
def fully_funded?
  if funds_still_needed <=0
    true
  else 
    false
  end
end
funds_still_needed() click to toggle source
# File lib/crowdfund/fundable.rb, line 14
def funds_still_needed
   @goal - funding_pledged
end
subtract(expense=15) click to toggle source
# File lib/crowdfund/fundable.rb, line 9
def subtract(expense=15)
    @funds = @funds - expense
    puts "Project #{@name} spent too much money! DARN!"
end