Class: Datadog::AppSec::Contrib::Rack::Gateway::Response
- Inherits:
-
Instrumentation::Gateway::Argument
- Object
- Instrumentation::Gateway::Argument
- Datadog::AppSec::Contrib::Rack::Gateway::Response
- Defined in:
- lib/datadog/appsec/contrib/rack/gateway/response.rb
Overview
Gateway Response argument.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(body, status, headers, scope:) ⇒ Response
constructor
A new instance of Response.
- #response ⇒ Object
Constructor Details
#initialize(body, status, headers, scope:) ⇒ Response
Returns a new instance of Response.
14 15 16 17 18 19 20 |
# File 'lib/datadog/appsec/contrib/rack/gateway/response.rb', line 14 def initialize(body, status, headers, scope:) super() @body = body @status = status @headers = headers.each_with_object({}) { |(k, v), h| h[k.downcase] = v } @scope = scope end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
12 13 14 |
# File 'lib/datadog/appsec/contrib/rack/gateway/response.rb', line 12 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
12 13 14 |
# File 'lib/datadog/appsec/contrib/rack/gateway/response.rb', line 12 def headers @headers end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
12 13 14 |
# File 'lib/datadog/appsec/contrib/rack/gateway/response.rb', line 12 def scope @scope end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
12 13 14 |
# File 'lib/datadog/appsec/contrib/rack/gateway/response.rb', line 12 def status @status end |
Instance Method Details
#response ⇒ Object
22 23 24 |
# File 'lib/datadog/appsec/contrib/rack/gateway/response.rb', line 22 def response @response ||= ::Rack::Response.new(body, status, headers) end |