Class: JsDuck::Tag::Template
- Inherits:
-
BooleanTag
- Object
- Tag
- BooleanTag
- JsDuck::Tag::Template
- Defined in:
- lib/jsduck/tag/template.rb
Constant Summary
Constants inherited from Tag
JsDuck::Tag::Tag::POS_ASIDE, JsDuck::Tag::Tag::POS_DEFAULT, JsDuck::Tag::Tag::POS_DEPRECATED, JsDuck::Tag::Tag::POS_DOC, JsDuck::Tag::Tag::POS_ENUM, JsDuck::Tag::Tag::POS_FIRES, JsDuck::Tag::Tag::POS_LOCALDOC, JsDuck::Tag::Tag::POS_OVERRIDES, JsDuck::Tag::Tag::POS_PARAM, JsDuck::Tag::Tag::POS_PREVENTABLE, JsDuck::Tag::Tag::POS_PRIVATE, JsDuck::Tag::Tag::POS_RETURN, JsDuck::Tag::Tag::POS_SINCE, JsDuck::Tag::Tag::POS_SUBPROPERTIES, JsDuck::Tag::Tag::POS_TEMPLATE, JsDuck::Tag::Tag::POS_THROWS, JsDuck::Tag::Tag::PRIORITY_CLASS, JsDuck::Tag::Tag::PRIORITY_COMPONENT, JsDuck::Tag::Tag::PRIORITY_SINGLETON
Instance Attribute Summary
Attributes inherited from Tag
#class_icon, #css, #ext_define_default, #ext_define_pattern, #html_position, #pattern, #repeatable, #signature, #tagname
Instance Method Summary collapse
-
#initialize ⇒ Template
constructor
A new instance of Template.
- #to_html(context) ⇒ Object
Methods inherited from BooleanTag
Methods inherited from Tag
descendants, #format, #parse_doc, #parse_ext_define, #process_doc
Constructor Details
#initialize ⇒ Template
Returns a new instance of Template.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# 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 |
Instance Method Details
#to_html(context) ⇒ Object
19 20 21 22 23 24 25 26 27 |
# 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 |