class CrowdFund::MatchingProject

Public Instance Methods

add_fund(amount=25) click to toggle source
Calls superclass method
# File lib/crowdfund/matching_project.rb, line 5
def add_fund(amount=25)
  amount = (amount * 2) if secured_half_funding?
  super(amount)
end
half_funding() click to toggle source
# File lib/crowdfund/matching_project.rb, line 10
def half_funding
  @target_funding / 2.0
end
secured_half_funding?() click to toggle source
# File lib/crowdfund/matching_project.rb, line 14
def secured_half_funding?
  @funding >= half_funding
end