class Crowdfund::MatchedProject
Public Instance Methods
add(donation=25)
click to toggle source
# File lib/crowdfund/matched_project.rb, line 5 def add(donation=25) if @funds >= @goal/2 @funds = @funds + (donation * 2) puts "Project #{@name} got matched funds!" else @funds = @funds + donation puts "Project #{@name} got more funds!" end end