Class: Datadog::AppSec::Instrumentation::Gateway::Middleware

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/appsec/instrumentation/gateway/middleware.rb

Overview

NOTE: This class extracted as-is and will be deprecated Instrumentation gateway middleware

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, &block) ⇒ Middleware

Returns a new instance of Middleware.



12
13
14
15
# File 'lib/datadog/appsec/instrumentation/gateway/middleware.rb', line 12

def initialize(key, &block)
  @key = key
  @block = block
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



10
11
12
# File 'lib/datadog/appsec/instrumentation/gateway/middleware.rb', line 10

def block
  @block
end

#keyObject (readonly)

Returns the value of attribute key.



10
11
12
# File 'lib/datadog/appsec/instrumentation/gateway/middleware.rb', line 10

def key
  @key
end

Instance Method Details

#call(stack, env) ⇒ Object



17
18
19
# File 'lib/datadog/appsec/instrumentation/gateway/middleware.rb', line 17

def call(stack, env)
  @block.call(stack, env)
end