Class: Greenroom::Reporter::Memory
- Inherits:
-
Reporter
- Object
- Reporter
- Greenroom::Reporter::Memory
- Defined in:
- lib/greenroom/reporter.rb
Overview
Accumulates every recorded event in memory instead of sending it
anywhere. Exists for tests: a spec can install this reporter and then
assert on #events instead of stubbing a real delivery library.
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.
- #record(event_type, attributes) ⇒ Object
Constructor Details
#initialize ⇒ Memory
Returns a new instance of Memory.
53 54 55 |
# File 'lib/greenroom/reporter.rb', line 53 def initialize @events = [] end |
Instance Attribute Details
#events ⇒ Object (readonly)
Returns the value of attribute events.
51 52 53 |
# File 'lib/greenroom/reporter.rb', line 51 def events @events end |