Class: Replay::TestEventStream
- Inherits:
-
Object
- Object
- Replay::TestEventStream
show all
- Includes:
- EventExaminer
- Defined in:
- lib/replay/test/test_event_stream.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#apply, #has_subscriber?, #similar_events
Constructor Details
7
8
9
|
# File 'lib/replay/test/test_event_stream.rb', line 7
def initialize
@events = []
end
|
Instance Attribute Details
#events ⇒ Object
Returns the value of attribute events.
5
6
7
|
# File 'lib/replay/test/test_event_stream.rb', line 5
def events
@events
end
|
Instance Method Details
#published(event_envelope) ⇒ Object
10
11
12
|
# File 'lib/replay/test/test_event_stream.rb', line 10
def published(event_envelope)
@events << event_envelope
end
|
#published?(stream_id, event) ⇒ Boolean
18
19
20
|
# File 'lib/replay/test/test_event_stream.rb', line 18
def published?(stream_id, event)
@events.detect{|e| e.stream_id == stream_id && e.event == event}
end
|
#published_event?(event) ⇒ Boolean
14
15
16
|
# File 'lib/replay/test/test_event_stream.rb', line 14
def published_event?(event)
@events.detect{|e| e.event==event}
end
|