Class: Valvat::LookupError
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean
-
#initialize(message, kind) ⇒ LookupError
constructor
A new instance of LookupError.
- #to_s ⇒ Object
Constructor Details
#initialize(message, kind) ⇒ LookupError
Returns a new instance of LookupError.
7 8 9 10 11 |
# File 'lib/valvat/error.rb', line 7 def initialize(, kind) @message = .to_s @kind = kind.is_a?(Class) ? kind.name.split('::').last : kind.to_s super(@message) end |
Instance Method Details
#eql?(other) ⇒ Boolean
17 18 19 |
# File 'lib/valvat/error.rb', line 17 def eql?(other) to_s.eql?(other.to_s) end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/valvat/error.rb', line 13 def to_s "The #{@kind} web service returned the error: #{@message}" end |