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
Overview
A synchronous wrapper for pipeline operations that executes one command at a time.
Instance Method Summary collapse
-
#call ⇒ Object
This method just accumulates the commands and their params.
-
#initialize(pipeline) ⇒ Sync
constructor
Initialize a new sync wrapper.
Constructor Details
#initialize(pipeline) ⇒ Sync
Initialize a new sync wrapper.
23 24 25 |
# File 'lib/async/redis/context/pipeline.rb', line 23 def initialize(pipeline) @pipeline = pipeline end |
Instance Method Details
#call ⇒ Object
This method just accumulates the commands and their params.
28 29 30 31 32 33 34 |
# File 'lib/async/redis/context/pipeline.rb', line 28 def call(...) @pipeline.call(...) @pipeline.flush(1) return @pipeline.read_response end |