Exception: RDoc::RI::Driver::NotFoundError

Inherits:
Error show all
Defined in:
lib/rdoc/ri/driver.rb

Overview

Raised when a name isn’t found in the ri data stores

Instance Method Summary collapse

Constructor Details

#initialize(klass, suggestion_proc = nil) ⇒ NotFoundError

:nodoc:



37
38
39
40
# File 'lib/rdoc/ri/driver.rb', line 37

def initialize(klass, suggestion_proc = nil) # :nodoc:
  @klass = klass
  @suggestion_proc = suggestion_proc
end

Instance Method Details

#messageObject

:nodoc:



49
50
51
52
53
54
55
56
# File 'lib/rdoc/ri/driver.rb', line 49

def message # :nodoc:
  str = "Nothing known about #{@klass}"
  suggestions = @suggestion_proc&.call
  if suggestions and !suggestions.empty?
    str += "\nDid you mean?  #{suggestions.join("\n               ")}"
  end
  str
end

#nameObject

Name that wasn’t found



45
46
47
# File 'lib/rdoc/ri/driver.rb', line 45

def name
  @klass
end