Exception: OAS::Error::HTTP

Inherits:
OAS::Error
  • Object
show all
Defined in:
lib/oas/error.rb

Constant Summary collapse

BadRequest =
Class.new(self)
Unauthorized =
Class.new(self)
Forbidden =
Class.new(self)
NotFound =
Class.new(self)
UnprocessableEntity =
Class.new(self)
TooManyRequests =
Class.new(self)
BadGateway =
Class.new(self)
GatewayTimeout =
Class.new(self)
InternalServerError =
Class.new(self)
ServiceUnavailable =
Class.new(self)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, headers, body) ⇒ HTTP

Returns a new instance of HTTP.



7
8
9
10
11
# File 'lib/oas/error.rb', line 7

def initialize(code, headers, body)
  @code    = code
  @headers = headers
  @body    = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



5
6
7
# File 'lib/oas/error.rb', line 5

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/oas/error.rb', line 5

def code
  @code
end

#headersObject (readonly)

Returns the value of attribute headers.



5
6
7
# File 'lib/oas/error.rb', line 5

def headers
  @headers
end