Exception: WebClient::ConnectionFail

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

Instance Method Summary collapse

Constructor Details

#initialize(inner_error) ⇒ ConnectionFail

Returns a new instance of ConnectionFail.



7
8
9
# File 'lib/web_client/error.rb', line 7

def initialize(inner_error)
  @inner_error = inner_error
end

Instance Method Details

#messageObject



15
16
17
# File 'lib/web_client/error.rb', line 15

def message
  "#{type}: #{@inner_error.message}"
end

#to_sObject



19
20
21
# File 'lib/web_client/error.rb', line 19

def to_s
  message
end

#typeObject



11
12
13
# File 'lib/web_client/error.rb', line 11

def type
  @inner_error.class
end