-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathraffle.rb
More file actions
executable file
·51 lines (47 loc) · 875 Bytes
/
raffle.rb
File metadata and controls
executable file
·51 lines (47 loc) · 875 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# quick-and-dirty Ruby script to raffle a prize
# author: Kevin Noonan.
#
# contributor: Sleep statements and general confusion added by @theirishpenguin
# (The list below has *all* Ruby Ireland members, at least on Meetup
# as at 15th April 2013.)
#
ruby_irelanders = File.readlines('ruby_irelanders.csv')
size = ruby_irelanders.length
puts ""
puts "The suspense..."
puts ""
sleep 6
puts "Is"
puts ""
sleep 4
puts "So"
puts ""
sleep 6
puts "Stressful"
sleep 4
puts ""
puts "THE WINNER..."
puts ""
sleep 6
3.times do
random_choice=rand(size).to_i
puts "IT'S NOT #{ruby_irelanders[random_choice]}"
puts ""
sleep 2
puts "..."
puts ""
sleep 6
end
puts ""
sleep 6
random_choice=rand(size).to_i
puts "THE WINNER IS..."
puts ""
sleep 4
puts "#{ruby_irelanders[random_choice]}"
sleep 2
puts "YES!!!"
puts ""
sleep 2
puts "Claim your Rubymine IDE prize!!!"
puts ""