class Estore::Commands::ReadBatch
Public Class Methods
new(connection, stream, from, limit)
click to toggle source
Calls superclass method
Estore::Commands::Command::new
# File lib/estore/commands/reads/batch.rb, line 9 def initialize(connection, stream, from, limit) super(connection) @stream, @from, @limit = stream, from, limit end
Public Instance Methods
call()
click to toggle source
# File lib/estore/commands/reads/batch.rb, line 14 def call register! read(@stream, @from, @limit) promise end
completed(response)
click to toggle source
# File lib/estore/commands/reads/batch.rb, line 20 def completed(response) remove! error = error(response) if error promise.reject error else promise.fulfill(Array(response.events)) end end