Class: EsHttpClient::ReadonlyStream
- Inherits:
-
Object
- Object
- EsHttpClient::ReadonlyStream
- Defined in:
- lib/es_http_client/readonly_stream.rb
Instance Method Summary collapse
-
#initialize(stream_name, connection) ⇒ ReadonlyStream
constructor
A new instance of ReadonlyStream.
- #replay_forward(&block) ⇒ Object
Constructor Details
#initialize(stream_name, connection) ⇒ ReadonlyStream
Returns a new instance of ReadonlyStream.
10 11 12 13 |
# File 'lib/es_http_client/readonly_stream.rb', line 10 def initialize(stream_name, connection) @stream_name = stream_name @connection = connection end |
Instance Method Details
#replay_forward(&block) ⇒ Object
15 16 17 18 |
# File 'lib/es_http_client/readonly_stream.rb', line 15 def replay_forward(&block) ref = StreamEvents.new(@stream_name, @connection).each(&block) CaughtUpStream.new(ref, @connection) end |