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 = OpenStruct.new) ⇒ Full

Returns a new instance of Full.



10
11
12
# File 'lib/jsduck/exporter/full.rb', line 10

def initialize(relations, opts=OpenStruct.new)
  # 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).



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

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