Method: YARD::Handlers::Ruby::Legacy::ExceptionHandler#process

Defined in:
lib/yard/handlers/ruby/legacy/exception_handler.rb

#processvoid

This method returns an undefined value.

Main processing callback

[View source]

5
6
7
8
9
10
11
# File 'lib/yard/handlers/ruby/legacy/exception_handler.rb', line 5

process do
  return unless owner.is_a?(MethodObject) # Only methods yield
  return if owner.has_tag?(:raise)

  klass = statement.tokens.to_s[/^raise[\(\s]*(#{NAMESPACEMATCH})\s*(?:\)|,|\s(?:if|unless|until)|;|(?:(?:\.|\:\:)\s*)?new|$)/, 1]
  owner.docstring.add_tag YARD::Tags::Tag.new(:raise, '', klass) if klass
end