class WikitextString

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.

Attributes

html[R]
text[R]

Public Class Methods

new(str, *options) click to toggle source
# 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

Public Instance Methods

to_html() click to toggle source
# File lib/acts_as_markup/exts/wikitext.rb, line 17
def to_html
  @html
end