module CrowdFund::Fundable

Public Instance Methods

add_fund(amount=25) click to toggle source
# File lib/crowdfund/fundable.rb, line 3
def add_fund(amount=25)
  self.funding += amount
  puts "\n#{name} got more funds!"
end
fully_funded?() click to toggle source
# File lib/crowdfund/fundable.rb, line 17
def fully_funded?
  funding_needed <= 0
end
funding_needed() click to toggle source
# File lib/crowdfund/fundable.rb, line 13
def funding_needed
  target_funding - funding
end
remove_fund(amount=15) click to toggle source
# File lib/crowdfund/fundable.rb, line 8
def remove_fund(amount=15)
  self.funding -= amount
  puts "\n#{name} lost some funds!"
end