lib/yard/handlers/ruby/legacy/exception_handler.rb in yard-0.5.3 vs lib/yard/handlers/ruby/legacy/exception_handler.rb in yard-0.5.4
- old
+ new
@@ -1,8 +1,8 @@
class YARD::Handlers::Ruby::Legacy::ExceptionHandler < YARD::Handlers::Ruby::Legacy::Base
handles /\Araise(\s|\()/
- def process
+ process do
return unless owner.is_a?(MethodObject) # Only methods yield
return if owner.has_tag?(:raise)
if klass = statement.tokens.to_s[/^raise[\(\s]*(#{NAMESPACEMATCH})(?:\)|,|\s|(?:\s*(?:\.|\:\:)\s*)?new|$)/, 1]
owner.docstring.add_tag YARD::Tags::Tag.new(:raise, '', klass)
\ No newline at end of file