module Fundraise::Fundable

Public Instance Methods

fully_funded?() click to toggle source
# File lib/fundraise/fundable.rb, line 21
def fully_funded?
  funding_needed <= 0
end
funding_needed() click to toggle source
# File lib/fundraise/fundable.rb, line 17
def funding_needed
  @target_funding-@current_funding
end
gain(gain=25, pledge=false) click to toggle source
# File lib/fundraise/fundable.rb, line 5
def gain(gain=25, pledge=false)
  @current_funding = @current_funding + gain
  if !pledge
  puts "#{@name} got more funds!"
  end
 end
lose(lose=15) click to toggle source
# File lib/fundraise/fundable.rb, line 12
def lose(lose=15)
  @current_funding = @current_funding - lose
  puts "#{@name} lost some funds!"
 end