Class: JsDuck::Tag::Overrides
Overview
There is no @overrides tag. Though there is a separate @override tag, this class here has little to do with it.
This here covers the HTML rendering of :overrides field, which gets added to members that override a member in their parent class.
Constant Summary
Constants inherited from Tag
Tag::POS_ASIDE, Tag::POS_DEFAULT, Tag::POS_DEPRECATED, Tag::POS_DOC, Tag::POS_ENUM, Tag::POS_FIRES, Tag::POS_LOCALDOC, Tag::POS_OVERRIDES, Tag::POS_PARAM, Tag::POS_PREVENTABLE, Tag::POS_PRIVATE, Tag::POS_RETURN, Tag::POS_SINCE, Tag::POS_SUBPROPERTIES, Tag::POS_TEMPLATE, Tag::POS_THROWS, Tag::PRIORITY_CLASS, Tag::PRIORITY_COMPONENT, 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
-
#format(m, formatter) ⇒ Object
Generate HTML links from :overrides data.
-
#initialize ⇒ Overrides
constructor
A new instance of Overrides.
- #to_html(m) ⇒ Object
Methods inherited from Tag
descendants, #parse_doc, #parse_ext_define, #process_doc
Constructor Details
#initialize ⇒ Overrides
Returns a new instance of Overrides.
11 12 13 14 |
# File 'lib/jsduck/tag/overrides.rb', line 11 def initialize @tagname = :overrides @html_position = POS_OVERRIDES end |
Instance Method Details
#format(m, formatter) ⇒ Object
Generate HTML links from :overrides data.
17 18 19 20 21 22 |
# File 'lib/jsduck/tag/overrides.rb', line 17 def format(m, formatter) m[:overrides].each do |o| label = o[:owner] + "." + o[:name] o[:link] = formatter.link(o[:owner], o[:name], label, m[:tagname], m[:static]) end end |
#to_html(m) ⇒ Object
24 25 26 |
# File 'lib/jsduck/tag/overrides.rb', line 24 def to_html(m) "<p>Overrides: " + m[:overrides].map {|o| o[:link] }.join(", ") + "</p>" end |