Class: Barker::Api::Response::Round

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/barker/api/response/round.rb

Instance Method Summary collapse

Methods inherited from Base

#error?, #ok?

Instance Method Details

#questionsObject



8
9
10
# File 'lib/barker/api/response/round.rb', line 8

def questions
  round.candidate_questions.map{|candidate_question| Response::CandidateQuestion.new(:candidate_question => candidate_question) }
end

#to_hashObject



12
13
14
15
16
# File 'lib/barker/api/response/round.rb', line 12

def to_hash
  {
    'questions' => questions.map(&:to_hash)
  }
end