Class: RedCloth::TextileDoc

Inherits:
Object
  • Object
show all
Defined in:
lib/redcloth-formatters-docbook/textile_doc.rb

Instance Method Summary collapse

Instance Method Details

#to_docbook(*rules) ⇒ Object

Generates DocBook from the Textile contents.

RedCloth.new( "And then? She *fell*!" ).to_docbook
  #=> "<para>And then? She fell!</para>"


10
11
12
13
14
15
16
17
# File 'lib/redcloth-formatters-docbook/textile_doc.rb', line 10

def to_docbook( *rules )
  apply_rules(rules)
  
  docbook = RedCloth::Formatters::Docbook.open_book
  docbook += to(RedCloth::Formatters::Docbook)
  docbook += RedCloth::Formatters::Docbook.close_book
  docbook
end