Exception: SynonymScrapper::WordFormatError

Inherits:
Error
  • Object
show all
Defined in:
lib/synonym_scrapper.rb

Overview

Exception thrown when the word is not a string.

Instance Method Summary collapse

Constructor Details

#initialize(word = "") ⇒ WordFormatError

Returns a new instance of WordFormatError.



28
29
30
31
# File 'lib/synonym_scrapper.rb', line 28

def initialize(word = "")
  msg = "The word #{word} is not a string, it must be a string."
  super msg
end