Class: JsDuck::ExportWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/jsduck/export_writer.rb

Overview

Performs the export in one of the export formats.

Instance Method Summary collapse

Constructor Details

#initialize(relations, assets, opts) ⇒ ExportWriter

Returns a new instance of ExportWriter.



14
15
16
17
18
# File 'lib/jsduck/export_writer.rb', line 14

def initialize(relations, assets, opts)
  @relations = relations
  @assets = assets
  @opts = opts
end

Instance Method Details

#writeObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/jsduck/export_writer.rb', line 20

def write
  format_classes

  clean_output_dir unless @opts.output_dir == :stdout

  export_classes
  export_examples_in_guides if @opts.export == :examples

  Util::Stdout.flush if @opts.output_dir == :stdout
end