class CrowdFund::SecureProject
Public Instance Methods
add(amount_to_add)
click to toggle source
Calls superclass method
CrowdFund::Fundable#add
# File lib/crowd_fund/secure_project.rb, line 10 def add(amount_to_add) if halfway? super(total_to_fund) puts "\n#{@name} has received a matching fund." else super(amount_to_add) end end
halfway?()
click to toggle source
# File lib/crowd_fund/secure_project.rb, line 6 def halfway? @amount == target / 2 end