Class: GreenmatCompat
- Inherits:
-
Object
- Object
- GreenmatCompat
- Defined in:
- lib/greenmat/compat.rb
Overview
Creates an instance of Greenmat with the RedCloth API.
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, *exts) ⇒ GreenmatCompat
constructor
A new instance of GreenmatCompat.
- #to_html(*_dummy) ⇒ Object
Constructor Details
#initialize(text, *exts) ⇒ GreenmatCompat
Returns a new instance of GreenmatCompat.
5 6 7 8 9 10 |
# File 'lib/greenmat/compat.rb', line 5 def initialize(text, *exts) exts_hash, render_hash = *(exts) @text = text renderer = Greenmat::Render::HTML.new(render_hash) @markdown = Greenmat::Markdown.new(renderer, exts_hash) end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/greenmat/compat.rb', line 3 def text @text end |
Instance Method Details
#to_html(*_dummy) ⇒ Object
12 13 14 |
# File 'lib/greenmat/compat.rb', line 12 def to_html(*_dummy) @markdown.render(text) end |