Class: JsDuck::Tag::Extends

Inherits:
Tag
  • Object
show all
Defined in:
lib/jsduck/tag/extends.rb

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

Methods inherited from Tag

descendants, #format, #to_html

Constructor Details

#initializeExtends

Returns a new instance of Extends.



6
7
8
9
10
11
# File 'lib/jsduck/tag/extends.rb', line 6

def initialize
  @pattern = ["extend", "extends"]
  @tagname = :extends
  @ext_define_pattern = "extend"
  @ext_define_default = {:extends => "Ext.Base"}
end

Instance Method Details

#parse_doc(p, pos) ⇒ Object

or



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/jsduck/tag/extends.rb', line 16

def parse_doc(p, pos)
  if p.match(/\{/)
    cls = p.ident_chain
    p.match(/\}/)
  else
    cls = p.ident_chain
  end

  {
    :tagname => :extends,
    :extends => cls,
  }
end

#parse_ext_define(cls, ast) ⇒ Object



34
35
36
# File 'lib/jsduck/tag/extends.rb', line 34

def parse_ext_define(cls, ast)
  cls[:extends] = JsDuck::Js::Utils.make_string(ast)
end

#process_doc(h, tags, pos) ⇒ Object



30
31
32
# File 'lib/jsduck/tag/extends.rb', line 30

def process_doc(h, tags, pos)
  h[:extends] = tags[0][:extends]
end