Class: Async::Redis::Context::Pipeline::Sync
- Inherits:
-
Object
- Object
- Async::Redis::Context::Pipeline::Sync
- Includes:
- Protocol::Redis::Methods
- Defined in:
- lib/async/redis/context/pipeline.rb
Instance Method Summary collapse
-
#call(command, *arguments) ⇒ Object
This method just accumulates the commands and their params.
-
#initialize(pipeline) ⇒ Sync
constructor
A new instance of Sync.
Constructor Details
#initialize(pipeline) ⇒ Sync
Returns a new instance of Sync.
20 21 22 |
# File 'lib/async/redis/context/pipeline.rb', line 20 def initialize(pipeline) @pipeline = pipeline end |
Instance Method Details
#call(command, *arguments) ⇒ Object
This method just accumulates the commands and their params.
25 26 27 28 29 30 31 |
# File 'lib/async/redis/context/pipeline.rb', line 25 def call(command, *arguments) @pipeline.call(command, *arguments) @pipeline.flush(1) return @pipeline.read_response end |