Class: RailsEventStore::Actions::ReadAllEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_event_store/actions/read_all_events.rb

Instance Method Summary collapse

Constructor Details

#initialize(repository) ⇒ ReadAllEvents

Returns a new instance of ReadAllEvents.



5
6
7
# File 'lib/rails_event_store/actions/read_all_events.rb', line 5

def initialize(repository)
  @repository = repository
end

Instance Method Details

#call(stream_name) ⇒ Object



9
10
11
12
# File 'lib/rails_event_store/actions/read_all_events.rb', line 9

def call(stream_name)
  raise IncorrectStreamData if stream_name.nil? || stream_name.empty?
  get_all_events(stream_name)
end