module CrowdFund::Fundable
Public Instance Methods
add_funds(amount=25)
click to toggle source
# File lib/fundraising_project/fundable.rb, line 3 def add_funds(amount=25) self.current_funding_amount += amount self.current_funding_amount = self.current_funding_amount.to_i puts "Project #{self.name} got more funds!" end
fully_funded?()
click to toggle source
# File lib/fundraising_project/fundable.rb, line 14 def fully_funded? self.total_funds >= self.target_funding_amount end
remove_funds(amount=15)
click to toggle source
# File lib/fundraising_project/fundable.rb, line 9 def remove_funds(amount=15) self.current_funding_amount -= amount puts "Project #{self.name} lost some funds!" end