Class: Mastalk::Document
Overview
Document class to preprocess mastalk specific syntax
Constant Summary
Constants included from Extensions
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source) ⇒ Document
constructor
A new instance of Document.
- #to_html(options = {}) ⇒ Object
Methods included from Extensions
#args, #extension, #extensions, #remove_syntax_from
Constructor Details
#initialize(source) ⇒ Document
Returns a new instance of Document.
13 14 15 |
# File 'lib/mastalk.rb', line 13 def initialize(source) @source = source.dup end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
11 12 13 |
# File 'lib/mastalk.rb', line 11 def source @source end |
Instance Method Details
#to_html(options = {}) ⇒ Object
17 18 19 20 |
# File 'lib/mastalk.rb', line 17 def to_html( = {}) [:auto_id] = [:auto_id].nil? ? true : [:auto_id] ::HTMLEntities.new.decode( kramdown().to_html() ) end |