Class: Obsidian::MarkdownDocument
- Inherits:
-
Object
- Object
- Obsidian::MarkdownDocument
- Defined in:
- lib/obsidian/parser/markdown_document.rb
Instance Method Summary collapse
- #generate_html ⇒ Object
-
#initialize(path, root, markdown_parser:) ⇒ MarkdownDocument
constructor
A new instance of MarkdownDocument.
Constructor Details
#initialize(path, root, markdown_parser:) ⇒ MarkdownDocument
Returns a new instance of MarkdownDocument.
5 6 7 8 9 |
# File 'lib/obsidian/parser/markdown_document.rb', line 5 def initialize(path, root, markdown_parser:) @path = path @root = root @markdown_parser = markdown_parser end |
Instance Method Details
#generate_html ⇒ Object
11 12 13 14 |
# File 'lib/obsidian/parser/markdown_document.rb', line 11 def generate_html markdown = @path.read @markdown_parser.parse(markdown, root: @root).to_html end |