Sha256: 661c874e659cd702e356ba6dea8719478456e6d486798aa0239b36c5edaaf121

Contents?: true

Size: 438 Bytes

Versions: 11

Compression:

Stored size: 438 Bytes

Contents

class YARD::Handlers::Ruby::Legacy::ExceptionHandler < YARD::Handlers::Ruby::Legacy::Base
  handles /\Araise(\s|\()/
  
  def process
    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)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
yard-0.5.3 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.5.2 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.5.1p1 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.5.1 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.5.0 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.4.0 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.2.3.5 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.2.3.4 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.2.3.2 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.2.3.3 lib/yard/handlers/ruby/legacy/exception_handler.rb
yard-0.2.3 lib/yard/handlers/ruby/legacy/exception_handler.rb