class GithubToCanvasQuiz::Parser::Markdown::Base
Attributes
frontmatter[R]
markdown[R]
Public Class Methods
new(markdown)
click to toggle source
# File lib/github_to_canvas_quiz/parser/markdown/base.rb, line 9 def initialize(markdown) # Separate the frontmatter and the rest of the markdown content parsed = if Pathname(markdown).exist? FrontMatterParser::Parser.parse_file(markdown) else FrontMatterParser::Parser.new(:md).call(markdown) end @frontmatter = parsed.front_matter @markdown = parsed.content end