Class: Writeup::Document
- Inherits:
-
Object
- Object
- Writeup::Document
- Defined in:
- lib/writeup/document.rb
Instance Attribute Summary collapse
-
#markdown ⇒ Object
Returns the value of attribute markdown.
Instance Method Summary collapse
- #html ⇒ Object
-
#initialize(markdown) ⇒ Document
constructor
A new instance of Document.
- #title ⇒ Object
- #toc ⇒ Object
Constructor Details
#initialize(markdown) ⇒ Document
Returns a new instance of Document.
4 5 6 |
# File 'lib/writeup/document.rb', line 4 def initialize(markdown) self.markdown = markdown end |
Instance Attribute Details
#markdown ⇒ Object
Returns the value of attribute markdown.
2 3 4 |
# File 'lib/writeup/document.rb', line 2 def markdown @markdown end |
Instance Method Details
#html ⇒ Object
8 9 10 |
# File 'lib/writeup/document.rb', line 8 def html parsed[:output] end |
#title ⇒ Object
16 17 18 |
# File 'lib/writeup/document.rb', line 16 def title parsed[:title] end |
#toc ⇒ Object
12 13 14 |
# File 'lib/writeup/document.rb', line 12 def toc parsed[:toc] end |