Class: GithubToCanvasQuiz::Parser::Markdown::Quiz

Inherits:
Base
  • Object
show all
Includes:
Helpers::NodeParser
Defined in:
lib/github_to_canvas_quiz/parser/markdown/quiz.rb

Overview

Parses a markdown file and returns a Quiz

Instance Attribute Summary

Attributes inherited from Base

#frontmatter, #markdown

Instance Method Summary collapse

Methods included from Helpers::NodeParser

#parse_text_from_node, #parse_text_from_nodes

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from GithubToCanvasQuiz::Parser::Markdown::Base

Instance Method Details

#parseObject



10
11
12
13
14
15
16
17
18
# File 'lib/github_to_canvas_quiz/parser/markdown/quiz.rb', line 10

def parse
  Model::Quiz.new(
    course_id: frontmatter['course_id'],
    id: frontmatter['id'],
    repo: frontmatter['repo'],
    title: title,
    description: description
  )
end