Class: JsDuck::Render::Class

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

Overview

Renders the whole documentation page for a class.

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Class

Returns a new instance of Class.



10
11
12
# File 'lib/jsduck/render/class.rb', line 10

def initialize(opts)
  @opts = opts
end

Instance Method Details

#render(cls) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/jsduck/render/class.rb', line 14

def render(cls)
  @cls = cls

  return [
    "<div>",
      render_sidebar,
      "<div class='doc-contents'>",
        render_tags(@cls),
      "</div>",
      "<div class='members'>",
        render_all_sections,
      "</div>",
    "</div>",
  ].flatten.compact.join
end