Class: Datadog::AppSec::Response
- Inherits:
-
Object
- Object
- Datadog::AppSec::Response
- Defined in:
- lib/datadog/appsec/response.rb
Overview
AppSec response
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(status:, headers: {}, body: []) ⇒ Response
constructor
A new instance of Response.
- #to_rack ⇒ Object
Constructor Details
permalink #initialize(status:, headers: {}, body: []) ⇒ Response
Returns a new instance of Response.
12 13 14 15 16 |
# File 'lib/datadog/appsec/response.rb', line 12 def initialize(status:, headers: {}, body: []) @status = status @headers = headers @body = body end |
Instance Attribute Details
permalink #body ⇒ Object (readonly)
Returns the value of attribute body.
10 11 12 |
# File 'lib/datadog/appsec/response.rb', line 10 def body @body end |
permalink #headers ⇒ Object (readonly)
Returns the value of attribute headers.
10 11 12 |
# File 'lib/datadog/appsec/response.rb', line 10 def headers @headers end |
permalink #status ⇒ Object (readonly)
Returns the value of attribute status.
10 11 12 |
# File 'lib/datadog/appsec/response.rb', line 10 def status @status end |
Class Method Details
permalink .from_interrupt_params(interrupt_params, http_accept_header) ⇒ Object
[View source]
23 24 25 26 27 |
# File 'lib/datadog/appsec/response.rb', line 23 def from_interrupt_params(interrupt_params, http_accept_header) return redirect_response(interrupt_params) if interrupt_params['location'] block_response(interrupt_params, http_accept_header) end |
Instance Method Details
permalink #to_rack ⇒ Object
[View source]
18 19 20 |
# File 'lib/datadog/appsec/response.rb', line 18 def to_rack [status, headers, body] end |