Class: MultiRedis::Step
- Inherits:
-
Object
- Object
- MultiRedis::Step
- Defined in:
- lib/multi_redis.rb
Instance Method Summary collapse
- #execute(context, *args) ⇒ Object
-
#initialize(target, multi_type, block) ⇒ Step
constructor
A new instance of Step.
- #multi_type ⇒ Object
Constructor Details
#initialize(target, multi_type, block) ⇒ Step
Returns a new instance of Step.
166 167 168 |
# File 'lib/multi_redis.rb', line 166 def initialize target, multi_type, block @target, @multi_type, @block = target, multi_type, block end |
Instance Method Details
#execute(context, *args) ⇒ Object
170 171 172 |
# File 'lib/multi_redis.rb', line 170 def execute context, *args @target.instance_exec *args.unshift(context), &@block end |
#multi_type ⇒ Object
174 175 176 |
# File 'lib/multi_redis.rb', line 174 def multi_type @multi_type end |