Module: GithubToCanvasQuiz::Parser::Canvas::Answer
- Defined in:
- lib/github_to_canvas_quiz/parser/canvas/answer.rb,
lib/github_to_canvas_quiz/parser/canvas/answer/base.rb,
lib/github_to_canvas_quiz/parser/canvas/answer/matching.rb,
lib/github_to_canvas_quiz/parser/canvas/answer/true_false.rb,
lib/github_to_canvas_quiz/parser/canvas/answer/short_answer.rb,
lib/github_to_canvas_quiz/parser/canvas/answer/multiple_choice.rb,
lib/github_to_canvas_quiz/parser/canvas/answer/multiple_answers.rb,
lib/github_to_canvas_quiz/parser/canvas/answer/multiple_dropdowns.rb,
lib/github_to_canvas_quiz/parser/canvas/answer/fill_in_multiple_blanks.rb
Defined Under Namespace
Classes: Base, FillInMultipleBlanks, Matching, MultipleAnswers, MultipleChoice, MultipleDropdowns, ShortAnswer, TrueFalse
Constant Summary collapse
- CLASSES =
{ 'fill_in_multiple_blanks_question' => FillInMultipleBlanks, 'matching_question' => Matching, 'multiple_answers_question' => MultipleAnswers, 'multiple_choice_question' => MultipleChoice, 'multiple_dropdowns_question' => MultipleDropdowns, 'short_answer_question' => ShortAnswer, 'true_false_question' => TrueFalse }.freeze
Class Method Summary collapse
Class Method Details
.for(type, data) ⇒ Object
26 27 28 29 30 |
# File 'lib/github_to_canvas_quiz/parser/canvas/answer.rb', line 26 def self.for(type, data) raise UnknownQuestionType, type unless CLASSES.key?(type) CLASSES[type].new(data).parse end |