Dumb fork of https://github.com/nilsding/questiongenerator/ that makes it easier to maintain the question lists
77a0159600 | ||
---|---|---|
lib | ||
.gitignore | ||
Gemfile | ||
LICENSE.txt | ||
README.md | ||
Rakefile | ||
questiongenerator.gemspec |
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
- Fork it ( https://github.com/justask/questiongenerator/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request