This allows a us to create a wrapper object similar to those provided by the Markdown and Textile libraries. It stores the original and formated HTML text in instance variables.
# File lib/acts_as_markup/exts/wikitext.rb, line 11 def initialize(str, *options) super(str) @text = str.to_s @html = Wikitext::Parser.new(*options).parse(@text) end
# File lib/acts_as_markup/exts/wikitext.rb, line 17 def to_html @html end