Exception: Exception

Defined in:
lib/exception_search/exception.rb

Overview

Extends the base exception class with methods to display links to search results

Instance Method Summary collapse

Instance Method Details

#to_googleObject



5
6
7
# File 'lib/exception_search/exception.rb', line 5

def to_google
  "https://www.google.com/search?q=#{URI::encode(message)}"
end

#to_stackoverflowObject



9
10
11
# File 'lib/exception_search/exception.rb', line 9

def to_stackoverflow
  "http://stackoverflow.com/search?q=#{URI::encode(message)}"
end