Class: YARDJS::Tags::EventDirective

Inherits:
Directive
  • Object
show all
Defined in:
lib/yard-js/tags.rb

Instance Method Summary collapse

Instance Method Details

#callObject



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/yard-js/tags.rb', line 18

def call
  overload = YARD::Tags::OverloadTag.new(:overload, tag.name)
  name = overload.name
  ns = YARD::CodeObjects::NamespaceObject === object ? object : handler.namespace
  obj = CodeObjects::EventObject.new(ns, name)
  ds = YARD::DocstringParser.new
  handler.register_group(obj)
  obj.parameters = overload.parameters
  obj.docstring = ds.parse(tag.text, obj, parser.handler).to_docstring
  obj
end