Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created August 6, 2015 16:01
Show Gist options
  • Save practicingruby/865ea7f7ec3648c1c369 to your computer and use it in GitHub Desktop.
Save practicingruby/865ea7f7ec3648c1c369 to your computer and use it in GitHub Desktop.
roster = Roster.new
data = PeopleService.fetch(some_search_params)
data.each do |person|
if roster.names.count < 10
roster.names << person.name
else
raise "You can't have a roster with more than 10 people on it"
end
end
roster.style = :colorized
RosterPrintout.new(roster).generate_pdf("out.pdf")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment