Class: RailsEventStore::Actions::ReadEventsBatch
- Inherits:
-
Object
- Object
- RailsEventStore::Actions::ReadEventsBatch
- Defined in:
- lib/rails_event_store/actions/read_events_batch.rb
Instance Method Summary collapse
- #call(stream_name, start, count) ⇒ Object
-
#initialize(repository) ⇒ ReadEventsBatch
constructor
A new instance of ReadEventsBatch.
Constructor Details
#initialize(repository) ⇒ ReadEventsBatch
Returns a new instance of ReadEventsBatch.
5 6 7 |
# File 'lib/rails_event_store/actions/read_events_batch.rb', line 5 def initialize(repository) @repository = repository end |
Instance Method Details
#call(stream_name, start, count) ⇒ Object
9 10 11 12 13 |
# File 'lib/rails_event_store/actions/read_events_batch.rb', line 9 def call(stream_name, start, count) raise IncorrectStreamData if stream_name.nil? || stream_name.empty? event = find_event(start) get_events_batch(stream_name, event.id, count) end |