Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (11 sloc) 327 Bytes
{EventEmitter} = require('events')
Answer = require './answer.js'
class Question extends EventEmitter
constructor:(@text)->
@answers = []
addAnswer:(answer)->
@answers.push answer
@emit 'answer_added', answer
answer.on 'upvoted', (count)=>
@emit 'answer_upvoted', count
module.exports = Question
Something went wrong with that request. Please try again.