class GHI::Client::Error

Attributes

response[R]

Public Class Methods

new(response) click to toggle source
# File lib/ghi/client.rb, line 15
def initialize response
  @response, @json = response, JSON.parse(response.body)
end

Public Instance Methods

body() click to toggle source
# File lib/ghi/client.rb, line 19
def body()    @json             end
errors() click to toggle source
# File lib/ghi/client.rb, line 21
def errors()  [*body['errors']] end
message() click to toggle source
# File lib/ghi/client.rb, line 20
def message() body['message']   end