Class: GMO::PG::GenericResponse

Inherits:
Payload
  • Object
show all
Defined in:
lib/gmo-pg/http_resource/generic_response.rb

Instance Method Summary collapse

Methods inherited from Payload

#[], #[]=, decode, encode, #initialize, #inspect, #payload, #to_hash

Constructor Details

This class inherits a constructor from GMO::PG::Payload

Instance Method Details

#error?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/gmo-pg/http_resource/generic_response.rb', line 4

def error?
  !!(err_code || err_info)
end

#errorsObject



8
9
10
# File 'lib/gmo-pg/http_resource/generic_response.rb', line 8

def errors
  GMO::PG::Errors.new(err_code, err_info) if error?
end