Class: RubyEventStore::Browser::GetStream

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_event_store/browser/get_stream.rb

Instance Method Summary collapse

Constructor Details

#initialize(routing:, stream_name:, related_streams_query:) ⇒ GetStream

Returns a new instance of GetStream.



6
7
8
9
10
# File 'lib/ruby_event_store/browser/get_stream.rb', line 6

def initialize(routing:, stream_name:, related_streams_query:)
  @routing = routing
  @stream_name = stream_name
  @related_streams_query = related_streams_query
end

Instance Method Details

#to_hObject



12
13
14
# File 'lib/ruby_event_store/browser/get_stream.rb', line 12

def to_h
  { data: JsonApiStream.new(stream_name, events_from_stream_url, related_streams).to_h }
end