Class: JsDuck::AppExporter

Inherits:
FullExporter show all
Defined in:
lib/jsduck/app_exporter.rb

Overview

Exports data for Docs app.

Instance Method Summary collapse

Constructor Details

#initialize(relations, opts) ⇒ AppExporter

Returns a new instance of AppExporter.



9
10
11
12
# File 'lib/jsduck/app_exporter.rb', line 9

def initialize(relations, opts)
  super(relations, opts)
  @renderer = Renderer.new(opts)
end

Instance Method Details

#export(cls) ⇒ Object

Returns compacted class data hash which contains an additional :html field with full HTML to show on class overview page.



16
17
18
19
20
# File 'lib/jsduck/app_exporter.rb', line 16

def export(cls)
  data = super(cls)
  data[:html] = @renderer.render(data)
  return compact(data)
end