https://github.com/burtlo/robut-quiz
Quiz Plugin for Robut
https://github.com/burtlo/robut-quiz
Last synced: 2 months ago
JSON representation
Quiz Plugin for Robut
- Host: GitHub
- URL: https://github.com/burtlo/robut-quiz
- Owner: burtlo
- Created: 2011-10-14T05:34:28.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-11-06T20:21:07.000Z (over 13 years ago)
- Last Synced: 2025-04-11T02:11:32.083Z (2 months ago)
- Language: Ruby
- Homepage:
- Size: 106 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: History.txt
Awesome Lists containing this project
README
# Robut-Quiz
A Plugin for [Robut](https://github.com/justinweiss/robut) that allows you to ask questions and collect the results from all participants within the chatroom.
## Usage
### Yes/No Question (Polar)
```
user_a > @robut ask 'Do you want to go to the bar at 4:30?'
robut > @user I have enqueued your question
robut > @all Question: 'Do you want to go to the bar at 4:30?'
user_a > @robut answer YES
user_b > @robut answer yes
user_c > @robut answer n
robut > @all The results are in for 'Do you want to go to the bar at 4:30?':
2 YES votes and 1 NO vote
```### Scale/Range Questions
```
user_a > @robut ask range 'How much did you like the bar we went to last week?' 1..10
robut > @user I have enqueued your question
robut > @all Question 'How much did you like the bar we went to last week?' (1..10)
user_a > @robut answer 1
user_b > @robut answer 5
user_c > @robut answer 10
robut > @all The results are in for 'How much did you like the bar we went to last week?':
3 votes with a mean of 5.333333
```### Choice Questions
```
user_a > @robut ask choice 'What drink should I order?' 'PBR', 'Martini', 'Bourbon'
robut > @user I have enqueued your question
robut > @all Question 'What drink should I order?' (1..10)
user_a > @robut answer PBR
user_b > @robut answer Martini
user_c > @robut answer Martini
robut > @all The results are in for 'What drink should I order?':
1 'PBR', 2 'Martini'
```## Installation
Install the gem
gem install robut-quiz
Add the plugin to your [Chatfile](https://github.com/justinweiss/robut/blob/master/examples/Chatfile)require 'robut_quiz'
Robut::Plugin.plugins << Robut::Plugin::Quiz