Sha256: 99539c94f66f3dd45d4a00ad0ecab7cb4a7b4ca203a3a718c5cc06cdd7a6dbd5

Contents?: true

Size: 487 Bytes

Versions: 4

Compression:

Stored size: 487 Bytes

Contents

# (see Ruby::ExceptionHandler)
class YARD::Handlers::Ruby::Legacy::ExceptionHandler < YARD::Handlers::Ruby::Legacy::Base
  handles /\Araise(\s|\()/

  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(?:if|unless|until)|;|(?:(?:\.|\:\:)\s*)?new|$)/, 1]
      owner.docstring.add_tag YARD::Tags::Tag.new(:raise, '', klass)
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
vanity-1.7.1 vendor/ruby/1.9.1/gems/yard-0.7.2/lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.7.2 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.7.1 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.7.0 lib/yard/handlers/ruby/legacy/exception_handler.rb