Module: EventStore::HTTP::Controls::ReadStream::OutputSchema::Result

Defined in:
lib/event_store/http/controls/read_stream/output_schema.rb

Class Method Summary collapse

Class Method Details

.example(events: nil, stream: nil) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/event_store/http/controls/read_stream/output_schema.rb', line 11

def self.example(events: nil, stream: nil)
  events ||= 1

  (0...events).to_a.reverse.map do |position|
    URI::Event.raw stream: stream, position: position
  end
end