Dumb fork of https://github.com/nilsding/questiongenerator/ that makes it easier to maintain the question lists
Go to file
nilsding af664629bd fixed this 2014-12-28 17:51:13 +01:00
lib fixed this 2014-12-28 17:51:13 +01:00
.gitignore updated gitignore 2014-12-12 14:07:20 +01:00
Gemfile initial commit 2014-12-09 00:59:33 +01:00
LICENSE.txt initial commit 2014-12-09 00:59:33 +01:00
README.md initial commit 2014-12-09 00:59:33 +01:00
Rakefile initial commit 2014-12-09 00:59:33 +01:00
questiongenerator.gemspec initial commit 2014-12-09 00:59:33 +01:00

README.md

questiongenerator

A simple question generator, used by justask.

Installation

Add this line to your application's Gemfile:

gem 'questiongenerator'

If you're feeling edgy, you can add this line instead:

gem 'questiongenerator', git: 'https://github.com/justask/questiongenerator.git'

Usage

require 'questiongenerator'

# Configure it
QuestionGenerator.question_base_path = '/home/nilsding/questions'
QuestionGenerator.default_locale = :en

# Get some questions
puts QuestionGenerator.generate
# => "What is the best thing about the internet?"

# You can also specify the locale, if you want to
puts QuestionGenerator.generate :de
# => "Was war das letzte, das du gegessen hast?"

Contributing

  1. Fork it ( https://github.com/justask/questiongenerator/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