Class: Middleware::InstrumentationTest::FakeInstrumenter

Inherits:
Object
  • Object
show all
Defined in:
test/middleware/instrumentation_test.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFakeInstrumenter

Returns a new instance of FakeInstrumenter.



60
61
62
# File 'test/middleware/instrumentation_test.rb', line 60

def initialize
  @instrumentations = []
end

Instance Attribute Details

#instrumentationsObject (readonly)

Returns the value of attribute instrumentations.



58
59
60
# File 'test/middleware/instrumentation_test.rb', line 58

def instrumentations
  @instrumentations
end

Instance Method Details

#instrument(name, env) ⇒ Object



64
65
66
67
# File 'test/middleware/instrumentation_test.rb', line 64

def instrument(name, env)
  @instrumentations << [name, env]
  yield
end