Class: JsDuck::Tag::Override
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 ⇒ Override
constructor
A new instance of Override.
- #parse_doc(p, pos) ⇒ Object
- #parse_ext_define(cls, ast) ⇒ Object
- #process_doc(h, tags, pos) ⇒ Object
Methods inherited from Tag
descendants, #format, #to_html
Constructor Details
#initialize ⇒ Override
Returns a new instance of Override.
6 7 8 9 10 |
# File 'lib/jsduck/tag/override.rb', line 6 def initialize @pattern = "override" @tagname = :override @ext_define_pattern = "override" end |
Instance Method Details
#parse_doc(p, pos) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/jsduck/tag/override.rb', line 13 def parse_doc(p, pos) if classname = p.ident_chain { :tagname => :override, :override => classname, } else # When @override not followed by class name, ignore the tag. # That's because the current ext codebase has some methods # tagged with @override to denote they override something. # But that's not what @override is meant for in JSDuck. nil end end |
#parse_ext_define(cls, ast) ⇒ Object
32 33 34 |
# File 'lib/jsduck/tag/override.rb', line 32 def parse_ext_define(cls, ast) cls[:override] = JsDuck::Js::Utils.make_string(ast) end |
#process_doc(h, tags, pos) ⇒ Object
28 29 30 |
# File 'lib/jsduck/tag/override.rb', line 28 def process_doc(h, , pos) h[:override] = [0][:override] end |