Class: Toy::Instrumenters::Memory
- Defined in:
- lib/toy/instrumenters/memory.rb
Overview
Instrumentor that is useful for tests as it stores each of the events that are instrumented.
Defined Under Namespace
Classes: Event
Instance Attribute Summary collapse
-
#events ⇒ Object
readonly
Returns the value of attribute events.
Instance Method Summary collapse
-
#initialize ⇒ Memory
constructor
A new instance of Memory.
- #instrument(name, payload = {}) ⇒ Object
Constructor Details
#initialize ⇒ Memory
Returns a new instance of Memory.
10 11 12 |
# File 'lib/toy/instrumenters/memory.rb', line 10 def initialize @events = [] end |
Instance Attribute Details
#events ⇒ Object (readonly)
Returns the value of attribute events.
8 9 10 |
# File 'lib/toy/instrumenters/memory.rb', line 8 def events @events end |