class RubyEventStore::RSpec::FetchEvents
Constants
- MissingEventStore
Attributes
event_store[R]
start[R]
stream_name[R]
Public Instance Methods
call()
click to toggle source
# File lib/ruby_event_store/rspec/fetch_events.rb, line 22 def call raise MissingEventStore if event_store.nil? events = event_store.read events = events.stream(stream_name) if stream_name events = events.from(start) if start events end
from(event_id)
click to toggle source
# File lib/ruby_event_store/rspec/fetch_events.rb, line 6 def from(event_id) @start = event_id end
from_last()
click to toggle source
# File lib/ruby_event_store/rspec/fetch_events.rb, line 18 def from_last @start = call.last&.event_id end
in(event_store)
click to toggle source
# File lib/ruby_event_store/rspec/fetch_events.rb, line 14 def in(event_store) @event_store = event_store end
stream(stream_name)
click to toggle source
# File lib/ruby_event_store/rspec/fetch_events.rb, line 10 def stream(stream_name) @stream_name = stream_name end