class EventStore::HTTP::ReadEvent::Substitute::ReadEvent
Attributes
response[RW]
Public Instance Methods
call(uri=nil, stream: nil, position: nil)
click to toggle source
# File lib/event_store/http/read_event/substitute.rb, line 12 def call(uri=nil, stream: nil, position: nil) uri ||= event_path stream, position uri = URI(uri) events.fetch uri.path do raise EventNotFoundError end end
events()
click to toggle source
# File lib/event_store/http/read_event/substitute.rb, line 28 def events @events ||= {} end
set_response(event, stream, position)
click to toggle source
# File lib/event_store/http/read_event/substitute.rb, line 22 def set_response(event, stream, position) path = event_path stream, position events[path] = event end