Class: JsDuck::Exporter::App
- Inherits:
-
Object
- Object
- JsDuck::Exporter::App
- Defined in:
- lib/jsduck/exporter/app.rb
Overview
Exports data for Docs app.
Instance Method Summary collapse
-
#export(cls) ⇒ Object
Returns compacted class data hash which contains an additional :html field with full HTML to show on class overview page.
-
#initialize(relations, opts) ⇒ App
constructor
A new instance of App.
Constructor Details
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.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/jsduck/exporter/app.rb', line 19 def export(cls) data = @full_exporter.export(cls) data[:classIcon] = Web::ClassIcons.get(cls) data[:superclasses] = cls.superclasses.collect {|c| c[:name] } data[:subclasses] = @relations.subclasses(cls).collect {|c| c[:name] }.sort data[:mixedInto] = @relations.mixed_into(cls).collect {|c| c[:name] }.sort data[:alternateClassNames] = cls[:alternateClassNames].sort if cls[:alternateClassNames] data[:mixins] = cls.deps(:mixins).collect {|c| c[:name] }.sort data[:parentMixins] = cls.parent_deps(:mixins).collect {|c| c[:name] }.sort data[:requires] = cls.deps(:requires).collect {|c| c[:name] }.sort data[:uses] = cls.deps(:uses).collect {|c| c[:name] }.sort data[:html] = @renderer.render(data) return compact(data) end |