Class: MultiRedis::Step
- Inherits:
-
Object
- Object
- MultiRedis::Step
- Defined in:
- lib/multi_redis/step.rb
Instance Method Summary collapse
- #execute(context, *args) ⇒ Object
-
#initialize(target, type, block) ⇒ Step
constructor
A new instance of Step.
- #type ⇒ Object
Constructor Details
#initialize(target, type, block) ⇒ Step
Returns a new instance of Step.
5 6 7 |
# File 'lib/multi_redis/step.rb', line 5 def initialize target, type, block @target, @type, @block = target, type, block end |
Instance Method Details
#execute(context, *args) ⇒ Object
9 10 11 |
# File 'lib/multi_redis/step.rb', line 9 def execute context, *args @target.instance_exec *args.unshift(context), &@block end |
#type ⇒ Object
13 14 15 |
# File 'lib/multi_redis/step.rb', line 13 def type @type end |