Exception: Redmine::Client::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/redmine/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ResponseError

Returns a new instance of ResponseError.



10
11
12
# File 'lib/redmine/client.rb', line 10

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/redmine/client.rb', line 9

def response
  @response
end

Instance Method Details

#bodyObject



14
15
16
# File 'lib/redmine/client.rb', line 14

def body
  response.body
end

#messageObject



18
19
20
# File 'lib/redmine/client.rb', line 18

def message
  "Error #{response.status}: #{response.body}"
end