Module: Crowdfund::FundingRound

Defined in:
lib/crowdfund/funding_round.rb

Class Method Summary collapse

Class Method Details

.do_round(project) ⇒ Object


7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/crowdfund/funding_round.rb', line 7

def self.do_round(project)
  die = Die.new
  case die.roll
  when 4..6
    project.add_funds
  when 2..3
    puts "#{project.name} received no funds this time."
  else
    project.lose_funds
  end
  project.receive_pledge
end