Exception: Inkdit::Error

Inherits:
Exception
  • Object
show all
Defined in:
lib/inkdit.rb

Overview

a generic exception raised when an request fails for any other reason

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Error

Returns a new instance of Error.



69
70
71
72
# File 'lib/inkdit.rb', line 69

def initialize(response)
  @response = response
  super()
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



67
68
69
# File 'lib/inkdit.rb', line 67

def response
  @response
end

Instance Method Details

#inspectObject



78
79
80
# File 'lib/inkdit.rb', line 78

def inspect
  "#<#{self.class.inspect} #{self.message}>"
end

#messageObject



74
75
76
# File 'lib/inkdit.rb', line 74

def message
  "response.status=#{response.status} response.body=#{response.body.inspect}"
end