class JsDuck::Tag::Template

Public Class Methods

new() click to toggle source
Calls superclass method JsDuck::Tag::BooleanTag::new
# File lib/jsduck/tag/template.rb, line 5
    def initialize
      @pattern = "template"
      @signature = {:long => "template", :short => "TMP"}
      @html_position = POS_TEMPLATE
      # Box with light gray background
      @css = <<-EOCSS
        .template-box {
          text-align: center;
          background-color: #eee;
        }
      EOCSS
      super
    end

Public Instance Methods

to_html(context) click to toggle source
# File lib/jsduck/tag/template.rb, line 19
    def to_html(context)
      <<-EOHTML
      <div class='rounded-box template-box'>
      <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