class JsDuck::Tag::Constructor

Public Class Methods

new() click to toggle source
# File lib/jsduck/tag/constructor.rb, line 5
def initialize
  @pattern = "constructor"
  @tagname = :constructor
end

Public Instance Methods

parse_doc(p, pos) click to toggle source

@constructor

# File lib/jsduck/tag/constructor.rb, line 11
def parse_doc(p, pos)
  {:tagname => :constructor, :doc => :multiline}
end
process_doc(h, tags, pos) click to toggle source

The method name will become “constructor” unless a separate @method tag already supplied the name.

# File lib/jsduck/tag/constructor.rb, line 17
def process_doc(h, tags, pos)
  h[:name] = "constructor" unless h[:name]
  # Documentation after @constructor is part of the constructor
  # method top-level docs.
  h[:doc] += tags[0][:doc]
end