Class: JsDuck::Tag::Xtype
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
Instance Attribute Summary
Attributes inherited from Tag
#css, #ext_define_default, #ext_define_pattern, #html_position, #pattern, #repeatable, #signature, #tagname
Instance Method Summary collapse
-
#initialize ⇒ Xtype
constructor
A new instance of Xtype.
-
#parse_alias_shorthand(p, namespace) ⇒ Object
Parses the name after @ftype, @xtype or @ptype and returns it with the given namespace prefix.
- #parse_doc(p, pos) ⇒ Object
- #parse_ext_define(cls, ast) ⇒ Object
Methods inherited from Tag
descendants, #format, #process_doc, #to_html
Constructor Details
#initialize ⇒ Xtype
Returns a new instance of Xtype.
6 7 8 9 10 |
# File 'lib/jsduck/tag/xtype.rb', line 6 def initialize @pattern = "xtype" @ext_define_pattern = "xtype" @repeatable = true end |
Instance Method Details
#parse_alias_shorthand(p, namespace) ⇒ Object
Parses the name after @ftype, @xtype or @ptype and returns it with the given namespace prefix.
22 23 24 |
# File 'lib/jsduck/tag/xtype.rb', line 22 def parse_alias_shorthand(p, namespace) namespace + "." + (p.ident_chain || "") end |
#parse_doc(p, pos) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/jsduck/tag/xtype.rb', line 13 def parse_doc(p, pos) { :tagname => :aliases, :name => parse_alias_shorthand(p, "widget") } end |
#parse_ext_define(cls, ast) ⇒ Object
26 27 28 |
# File 'lib/jsduck/tag/xtype.rb', line 26 def parse_ext_define(cls, ast) cls[:aliases] += JsDuck::Js::Utils.make_string_list(ast).map {|xtype| "widget."+xtype } end |