Class: JsDuck::Tag::Required
Overview
There is no @required tag. Instead the :required attribute is detected after @cfg:
@cfg {Type} someName (required)
This class is only used for rendering the required attribute in HTML documentation, not for detecting it. The detection is done with custom logic in @cfg and DocAst classes.
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
-
#initialize ⇒ Required
constructor
A new instance of Required.
- #process_doc(h, docs, pos) ⇒ Object
Methods inherited from Tag
descendants, #format, #parse_doc, #parse_ext_define, #to_html
Constructor Details
#initialize ⇒ Required
Returns a new instance of Required.
13 14 15 16 17 |
# File 'lib/jsduck/tag/required.rb', line 13 def initialize @tagname = :required @signature = {:long => "required", :short => "REQ"} @css = ".signature .required { background-color: #484848 }" # Docs text color end |
Instance Method Details
#process_doc(h, docs, pos) ⇒ Object
19 20 21 |
# File 'lib/jsduck/tag/required.rb', line 19 def process_doc(h, docs, pos) h[:required] = true end |