Exception: WikipediaWrapper::DisambiguationError

Inherits:
WikipediaError
  • Object
show all
Defined in:
lib/wikipedia_wrapper/exception.rb

Overview

Note:

‘options` does not include titles that do not link to a valid Wikipedia page.

Exception raised when a page resolves to a Disambiguation page.

The ‘options` property contains a list of titles of Wikipedia pages that the query may refer to.

Instance Method Summary collapse

Constructor Details

#initialize(title) ⇒ DisambiguationError

Returns a new instance of DisambiguationError.



105
106
107
# File 'lib/wikipedia_wrapper/exception.rb', line 105

def initialize(title)
  @title = title
end

Instance Method Details

#messageObject



109
110
111
# File 'lib/wikipedia_wrapper/exception.rb', line 109

def message
  "\"#{@title}\" may refer to several different things."
end