Class: Karaden::Net::NoContentsResponse
- Inherits:
-
ResponseInterface
- Object
- ResponseInterface
- Karaden::Net::NoContentsResponse
- Defined in:
- lib/karaden/net/no_contents_response.rb
Constant Summary collapse
- ERRORS =
{ Karaden::Exception::BadRequestException::STATUS_CODE => Karaden::Exception::BadRequestException, Karaden::Exception::UnauthorizedException::STATUS_CODE => Karaden::Exception::UnauthorizedException, Karaden::Exception::NotFoundException::STATUS_CODE => Karaden::Exception::NotFoundException, Karaden::Exception::ForbiddenException::STATUS_CODE => Karaden::Exception::ForbiddenException, Karaden::Exception::UnprocessableEntityException::STATUS_CODE => Karaden::Exception::UnprocessableEntityException, Karaden::Exception::TooManyRequestsException::STATUS_CODE => Karaden::Exception::TooManyRequestsException }.freeze
Instance Method Summary collapse
- #error ⇒ Object
- #error? ⇒ Boolean
- #headers ⇒ Object
-
#initialize(response, request_options) ⇒ NoContentsResponse
constructor
A new instance of NoContentsResponse.
- #object ⇒ Object
- #status_code ⇒ Object
Constructor Details
#initialize(response, request_options) ⇒ NoContentsResponse
Returns a new instance of NoContentsResponse.
13 14 15 16 17 18 19 |
# File 'lib/karaden/net/no_contents_response.rb', line 13 def initialize(response, ) @error = nil @status_code = nil @headers = nil super() interpret(response, ) end |
Instance Method Details
#error ⇒ Object
21 22 23 |
# File 'lib/karaden/net/no_contents_response.rb', line 21 def error() @error end |
#error? ⇒ Boolean
37 38 39 |
# File 'lib/karaden/net/no_contents_response.rb', line 37 def error?() !@error.nil? end |
#headers ⇒ Object
33 34 35 |
# File 'lib/karaden/net/no_contents_response.rb', line 33 def headers() @headers end |
#object ⇒ Object
25 26 27 |
# File 'lib/karaden/net/no_contents_response.rb', line 25 def object() raise NotImplementedError end |
#status_code ⇒ Object
29 30 31 |
# File 'lib/karaden/net/no_contents_response.rb', line 29 def status_code() @status_code end |