Module: GithubToCanvasQuiz::Parser::Markdown::Answer
- Defined in:
- lib/github_to_canvas_quiz/parser/markdown/answer.rb,
lib/github_to_canvas_quiz/parser/markdown/answer/base.rb,
lib/github_to_canvas_quiz/parser/markdown/answer/matching.rb,
lib/github_to_canvas_quiz/parser/markdown/answer/true_false.rb,
lib/github_to_canvas_quiz/parser/markdown/answer/short_answer.rb,
lib/github_to_canvas_quiz/parser/markdown/answer/multiple_choice.rb,
lib/github_to_canvas_quiz/parser/markdown/answer/multiple_answers.rb,
lib/github_to_canvas_quiz/parser/markdown/answer/multiple_dropdowns.rb,
lib/github_to_canvas_quiz/parser/markdown/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, title, nodes) ⇒ Object
26 27 28 29 30 |
# File 'lib/github_to_canvas_quiz/parser/markdown/answer.rb', line 26 def self.for(type, title, nodes) raise UnknownQuestionType, type unless CLASSES.key?(type) CLASSES[type].new(title, nodes).parse end |