PullReview stats Build
Status

QuizMaster

This is a gem which will contain the components necessary to create multiple choice tests, and generate question and answer sheets for those tests.

It is currently in a pre-release state as I experiment with its internal structure and use it as a "programming exercise yard".

Installation

Add this line to your application's Gemfile:

gem 'quiz_master'

And then execute:

$ bundle

Or install it yourself as:

$ gem install quiz_master

Usage

At the moment the only working part is a crude text formatter:

require 'quiz_master'

include QuizMaster

q = Question.new(
  prompt: 'This is the prompt.  It poses the question.',
  answers: [
    Answer.new('This is the first answer', '5'),
    Answer.new('This is the second answer'),
    Answer.new('This is the third answer', '3'),
    Answer.new('{{3}} and {{5}}')
  ]
)

TextQuestionFormatter.new.format(q, 1)
# =>
# 1) This is the prompt.  It poses the question.
# 
#   a) This is the first answer
#   b) This is the second answer
#   c) This is the third answer
#   d) (a) and (c)

Contributing

  1. Fork it ( https://github.com/mikestok/quiz_master/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request