Class: AsciiDoc::AsciiDocument
- Inherits:
-
Object
- Object
- AsciiDoc::AsciiDocument
- Includes:
- AsciiPlugins
- Defined in:
- lib/asciidoc/asciidocument.rb
Constant Summary
Constants included from AsciiPlugins
AsciiDoc::AsciiPlugins::Plugins
Instance Method Summary collapse
-
#initialize(content) ⇒ AsciiDocument
constructor
A new instance of AsciiDocument.
- #render(format, template_folder, output_folder) ⇒ Object
Methods included from AsciiPlugins
Constructor Details
#initialize(content) ⇒ AsciiDocument
Returns a new instance of AsciiDocument.
7 8 9 10 11 |
# File 'lib/asciidoc/asciidocument.rb', line 7 def initialize(content) @element = AsciiDoc::AsciiElement.new(:document) @lines = AsciiDoc::AsciiLines.new(content) parse_lines end |
Instance Method Details
#render(format, template_folder, output_folder) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/asciidoc/asciidocument.rb', line 13 def render(format, template_folder, output_folder) case format when :html render_html(template_folder, output_folder) when :pdf render_pdf(template_folder, output_folder) else raise "Bad Render Format Specified" end end |