Class: Barker::Guideline::Llbaraquiz

Inherits:
Base
  • Object
show all
Defined in:
lib/barker/guideline/llbaraquiz.rb

Constant Summary

Constants included from Errors

Errors::AlreadyAnsweredError, Errors::AlreadyStartedError, Errors::AnswerNotFoundError, Errors::BarkerError, Errors::FileNotExistError, Errors::HasToRespondToIdError, Errors::HasToRespondToLocaleError, Errors::JokerAlreadyUsedError, Errors::NoCurrentStageError, Errors::NotStartedError, Errors::RecordNotFound, Errors::UnknownJokerError

Instance Method Summary collapse

Methods inherited from Base

#answer, #candidates, #initialize

Constructor Details

This class inherits a constructor from Barker::Guideline::Base

Instance Method Details

#jokersObject



10
11
12
# File 'lib/barker/guideline/llbaraquiz.rb', line 10

def jokers
  ['fifty_fifty']
end

#pathObject



22
23
24
# File 'lib/barker/guideline/llbaraquiz.rb', line 22

def path
  File.expand_path "#{File.dirname(__FILE__)}/../../../lib/barker/guideline/llbaraquiz/questions.yaml"
end

#questionsObject



14
15
16
# File 'lib/barker/guideline/llbaraquiz.rb', line 14

def questions
  Barker::Import::Yaml.process(path)
end

#quizzesObject



6
7
8
# File 'lib/barker/guideline/llbaraquiz.rb', line 6

def quizzes
  [Quiz.new(questions.sample(5))]
end

#round_timeObject



18
19
20
# File 'lib/barker/guideline/llbaraquiz.rb', line 18

def round_time
  35
end