Class: JsDuck::Exporter::Full

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

Overview

Exporter for all the class docs.

Instance Method Summary collapse

Constructor Details

#initialize(relations, opts = {}) ⇒ Full

Returns a new instance of Full.



8
9
10
# File 'lib/jsduck/exporter/full.rb', line 8

def initialize(relations, opts={})
  # parameters are just for compatibility with other exporters
end

Instance Method Details

#export(cls) ⇒ Object

Returns a hash of class data, with :members field expanded into list of all members (including those inherited from parents and mixins).



15
16
17
18
19
20
21
22
23
# File 'lib/jsduck/exporter/full.rb', line 15

def export(cls)
  # Make copy of the internal data structure of a class
  # so our modifications on it will be safe.
  h = cls.internal_doc.clone

  h[:members] = export_members(cls)

  h
end