Exception: Rack::Idempotent::HTTPException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/rack-idempotent/http_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, headers, body, request) ⇒ HTTPException

Returns a new instance of HTTPException.



3
4
5
# File 'lib/rack-idempotent/http_exception.rb', line 3

def initialize(status, headers, body, request)
  @status, @headers, @body, @request = status, headers, body, request
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



2
3
4
# File 'lib/rack-idempotent/http_exception.rb', line 2

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



2
3
4
# File 'lib/rack-idempotent/http_exception.rb', line 2

def headers
  @headers
end

#requestObject (readonly)

Returns the value of attribute request.



2
3
4
# File 'lib/rack-idempotent/http_exception.rb', line 2

def request
  @request
end

#statusObject (readonly)

Returns the value of attribute status.



2
3
4
# File 'lib/rack-idempotent/http_exception.rb', line 2

def status
  @status
end

Instance Method Details

#to_sObject



7
8
9
# File 'lib/rack-idempotent/http_exception.rb', line 7

def to_s
  @status.to_s
end