Sha256: 5262ce9e18f5cb785eb0f4731579df9609472a76c945374ccdf364747e7d36cc

Contents?: true

Size: 954 Bytes

Versions: 11

Compression:

Stored size: 954 Bytes

Contents

class Testing
  # Ignore yields outside methods
  raise NoMethodError, "reason"
  
  # Should document this
  def mymethod
    raise ArgumentError, "Argument is missing"
  end
  
  # Don't document this
  def mymethod2
    raise(a) 
  end
  
  # Don't document this (docstring takes precedence)
  # @raise [A]
  def mymethod3 
    raise SomethingElse
  end
  
  # Only document the first one (limitation of exc handler)
  def mymethod4 
    raise(A)
    raise B, "Argument", somethingelse
  end
  
  def mymethod5
    raise YARD::Parser::UndocumentableError
  end
  
  def mymethod6
    raise YARD::Handlers.constants("test")
  end
  
  def mymethod7
    raise MethodCall('argument')
  end
  
  def mymethod8
    raise ExceptionClass.new('blah')
  end

  def mymethod9
    obj.raise IgnoreMe
	obj.raise(IgnoreMe)
  end
  
  def mymethod10
    raise ArgumentError 'Message' # actually a method call
  end
  
  def mymethod11
    raise foo('bar')
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
vanity-1.7.1 vendor/ruby/1.9.1/gems/yard-0.7.2/spec/handlers/examples/exception_handler_001.rb.txt
yard-0.7.2 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.7.1 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.7.0 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.6.8 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.6.7 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.6.6 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.6.5 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.6.4 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.6.3 spec/handlers/examples/exception_handler_001.rb.txt
yard-0.6.2 spec/handlers/examples/exception_handler_001.rb.txt