Class: HttpEventstore::Actions::ReadStreamEventsForward
- Inherits:
-
Object
- Object
- HttpEventstore::Actions::ReadStreamEventsForward
- Defined in:
- lib/http_eventstore/actions/read_stream_events_forward.rb
Instance Method Summary collapse
- #call(stream_name, start, count, pool) ⇒ Object
-
#initialize(client) ⇒ ReadStreamEventsForward
constructor
A new instance of ReadStreamEventsForward.
Constructor Details
#initialize(client) ⇒ ReadStreamEventsForward
Returns a new instance of ReadStreamEventsForward.
5 6 7 |
# File 'lib/http_eventstore/actions/read_stream_events_forward.rb', line 5 def initialize(client) @client = client end |
Instance Method Details
#call(stream_name, start, count, pool) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/http_eventstore/actions/read_stream_events_forward.rb', line 9 def call(stream_name, start, count, pool) response = get_stream_batch(stream_name, start, count, pool) return_events(response['entries']) rescue ClientError => e raise StreamAlreadyDeleted if e.code == 410 raise StreamNotFound if e.code == 404 end |