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.
36 37 38 |
# File 'lib/async/redis/context/pipeline.rb', line 36 def initialize(pipeline) @pipeline = pipeline end |
Instance Method Details
#call(command, *arguments) ⇒ Object
This method just accumulates the commands and their params.
41 42 43 44 45 46 47 |
# File 'lib/async/redis/context/pipeline.rb', line 41 def call(command, *arguments) @pipeline.call(command, *arguments) @pipeline.flush(1) return @pipeline.read_response end |