class JsDuck::Tag::Xtype

Public Class Methods

new() click to toggle source
# File lib/jsduck/tag/xtype.rb, line 6
def initialize
  @pattern = "xtype"
  @ext_define_pattern = "xtype"
  @repeatable = true
end

Public Instance Methods

parse_alias_shorthand(p, namespace) click to toggle source

Parses the name after @ftype, @xtype or @ptype and returns it with the given namespace prefix.

# File lib/jsduck/tag/xtype.rb, line 22
def parse_alias_shorthand(p, namespace)
  namespace + "." + (p.ident_chain || "")
end
parse_doc(p, pos) click to toggle source

@xtype name

# 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) click to toggle source
# 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