Method: JsDuck::Render::Subproperties#render_single_param

Defined in:
lib/jsduck/render/subproperties.rb

#render_single_param(p) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/jsduck/render/subproperties.rb', line 51

def render_single_param(p)
  return [
    "<li>",
      "<span class='pre'>#{p[:name]}</span> : ",
      p[:html_type],
      p[:optional] ? " (optional)" : "",
      "<div class='sub-desc'>",
        p[:doc],
        p[:default] ? "<p>Defaults to: <code>#{Util::HTML.escape(p[:default])}</code></p>" : "",
        p[:properties] && p[:properties].length > 0 ? render(p) : "",
      "</div>",
    "</li>",
  ]
end