Class: YARD::Handlers::Rake::TaskHandler

Inherits:
Base
  • Object
show all
Defined in:
lib/yard-rake.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) process

Main processing callback



54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/yard-rake.rb', line 54

process do
  arg = statement.parameters[0][0]
  name = arg.jump(:ident, :tstring_content).source
  deps = arg.type == :assoc ? arg[1].source : nil
  obj = CodeObjects::Rake::TaskObject.new(namespace, name)
  register(obj)
  
  if parser.desc_comments && obj.docstring.blank?
    obj.docstring += parser.desc_comments
  end
  obj.docstring.add_tag Tags::Tag.new(:task_deps, deps) if deps
  parser.desc_comments = nil
end