Created
September 26, 2010 12:49
-
-
Save johnd/597896 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BUZZWORD BINGO | |
# Depends on the 'prawn' gem | |
WORDS = ["Bottom Line", | |
"Main Thing", | |
"Synergise", | |
"Innovate", | |
"Pain Point", | |
"Growth Potential", | |
"The Cloud", | |
"Solution", | |
"Strategic", | |
"Market Leading", | |
"Platform", | |
"Policy", | |
"Big Picture", | |
"Team Building", | |
"Scenarios", | |
"Knowledge Base", | |
"Going Forward", | |
"Touch Base", | |
"Social Media", | |
"In House", | |
"I Mean", | |
"Partnership", | |
"Critical", | |
"Big Changes"] | |
class Buzzwords | |
def initialize(words) | |
@words = words | |
self | |
end | |
def generate(count) | |
hashes = [] | |
cards = [] | |
count.times do | |
card = @words.shuffle | |
redo if hashes.include? card.hash | |
hashes << card.hash | |
cards << card | |
end | |
cards | |
end | |
end | |
cards = Buzzwords.new(WORDS).generate(20) | |
require 'rubygems' | |
require 'prawn' | |
require 'prawn/layout' | |
cards.each_with_index do | card, i | | |
card.insert 12, "(FREE!)" | |
5.times do | |
card << card.slice!(0..4) | |
end | |
Prawn::Document.generate("bingo-card-#{i}.pdf") do | |
text("BUZZWORD BINGO!", :align => :center, | |
:size => 72) | |
table(card, :border_style => :grid, | |
:column_widths => {0 => 113, 1 => 113, 2 => 113, 3 => 113, 4 => 113}, | |
:align => :center, | |
:position => :center, | |
:vertival_padding => 72, | |
:font_size => 20) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment