Skip to content

Instantly share code, notes, and snippets.

View riffraff's full-sized avatar

Gabriele Renzi riffraff

View GitHub Profile
@riffraff
riffraff / quiz.rb
Created May 16, 2009 12:33 — forked from ryanb/quiz.rb
# use a single string object as IO, enforces ordering, use srand to avoid randomness and stubbing/subclassing
class Quiz
def initialize(input = STDIN, output = STDOUT)
@input = input
@output = output
end
def problem
first = rand(10)
second = rand(10)