Class: JsDuck::Tag::Doc
- Inherits:
-
JsDuck::Tag
- Object
- JsDuck::Tag
- JsDuck::Tag::Doc
- Defined in:
- lib/jsduck/tag/doc.rb
Overview
A special class for rendering the documentation field inside classes and members.
Instance Method Summary collapse
- #format(m, formatter) ⇒ Object
-
#initialize ⇒ Doc
constructor
A new instance of Doc.
- #to_html(m) ⇒ Object
Constructor Details
Instance Method Details
#format(m, formatter) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/jsduck/tag/doc.rb', line 14 def format(m, formatter) m[:doc] = formatter.format(m[:doc]) if (m) || @shortener.too_long?(m[:doc]) m[:short_doc] = @shortener.shorten(m[:doc]) end end |
#to_html(m) ⇒ Object
22 23 24 |
# File 'lib/jsduck/tag/doc.rb', line 22 def to_html(m) m[:doc] end |