Class: RedisLock::Strategy

Inherits:
Object
  • Object
show all
Defined in:
lib/redis_lock/strategy.rb

Direct Known Subclasses

IfLocked, IfOpen, Semaphore

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(lock, args = {}) ⇒ Strategy

Returns a new instance of Strategy.



5
6
7
8
# File 'lib/redis_lock/strategy.rb', line 5

def initialize(lock, args = {})
  @lock = lock
  @args = args
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



3
4
5
# File 'lib/redis_lock/strategy.rb', line 3

def args
  @args
end

#lockObject (readonly)

Returns the value of attribute lock.



3
4
5
# File 'lib/redis_lock/strategy.rb', line 3

def lock
  @lock
end

Instance Method Details

#after_performObject



14
15
# File 'lib/redis_lock/strategy.rb', line 14

def after_perform
end

#call(&block) ⇒ Object

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/redis_lock/strategy.rb', line 10

def call(&block)
  raise NotImplementedError
end