Class: GrapeDocumenter::Formatters::Html

Inherits:
Object
  • Object
show all
Defined in:
lib/grape_documenter/formatters/html.rb

Overview

For ease this uses the textile formatter first then post processes to html

Instance Method Summary collapse

Constructor Details

#initialize(structure) ⇒ Html

Returns a new instance of Html.



7
8
9
# File 'lib/grape_documenter/formatters/html.rb', line 7

def initialize(structure)
  @structure = structure
end

Instance Method Details

#formatObject



11
12
13
14
# File 'lib/grape_documenter/formatters/html.rb', line 11

def format
  textile = Textile.new(@structure)
  RedCloth.new(textile.format).to_html
end