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

#assets, #boolean, #context, #formatter, #key, #multiline, #name, #position, #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)
  <<-EOHTML
  <div class='signature-box template'>
  <p>This is a <a href="#!/guide/components">template method</a>.
     a hook into the functionality of this class.
     Feel free to override it in child classes.</p>
  </div>
  EOHTML
end