Class: Transmuter::Format::Textile

Inherits:
Object
  • Object
show all
Defined in:
lib/transmuter/format/textile.rb

Instance Method Summary collapse

Constructor Details

#initialize(textile, options = {}) ⇒ Textile

Returns a new instance of Textile.



6
7
8
9
# File 'lib/transmuter/format/textile.rb', line 6

def initialize(textile, options = {})
  parse_options(options)
  @textile = textile
end

Instance Method Details

#to_htmlObject



17
18
19
20
# File 'lib/transmuter/format/textile.rb', line 17

def to_html
  html = Html.new(parse_textile, get_options)
  html.process
end

#to_pdfObject



11
12
13
14
15
# File 'lib/transmuter/format/textile.rb', line 11

def to_pdf
  html = to_html
  pdf = Pdf.new(html, get_options)
  pdf.process
end