Class: JsDuck::Tag::Template

Inherits:
MetaTag
  • Object
show all
Defined in:
lib/jsduck/tag/template.rb

Overview

Implementation of @template tag

Instance Attribute Summary

Attributes inherited from MetaTag

#boolean, #context, #formatter, #key, #multiline, #name, #signature

Instance Method Summary collapse

Methods inherited from MetaTag

descendants, #format, #to_value

Constructor Details

#initializeTemplate

Returns a new instance of Template.



6
7
8
9
10
11
# File 'lib/jsduck/tag/template.rb', line 6

def initialize
  @name = "template"
  @key = :template
  @signature = {:long => "template", :short => "TMP"}
  @boolean = true
end

Instance Method Details

#to_html(contents) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/jsduck/tag/template.rb', line 13

def to_html(contents)
  "  <div class='signature-box template'>\n  <p>This is a <a href=\"#!/guide/components\">template method</a>.\n     a hook into the functionality of this class.\n     Feel free to override it in child classes.</p>\n  </div>\n  EOHTML\nend\n"