Class: Zold::Http::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/zold/http.rb

Overview

The error, if connection fails

Instance Method Summary collapse

Constructor Details

#initialize(ex) ⇒ Error

Returns a new instance of Error.


91
92
93
# File 'lib/zold/http.rb', line 91

def initialize(ex)
  @ex = ex
end

Instance Method Details

#bodyObject


95
96
97
# File 'lib/zold/http.rb', line 95

def body
  Backtrace.new(@ex).to_s
end

#codeObject


99
100
101
# File 'lib/zold/http.rb', line 99

def code
  '599'
end

#messageObject


103
104
105
# File 'lib/zold/http.rb', line 103

def message
  @ex.message
end