Exception: Redis::Lock::NotLocked

Inherits:
Error
  • Object
show all
Defined in:
lib/redis-lock.rb

Instance Attribute Summary

Attributes inherited from Error

#lock

Instance Method Summary collapse

Constructor Details

#initialize(operation, lock) ⇒ NotLocked

Returns a new instance of NotLocked.



253
254
255
256
# File 'lib/redis-lock.rb', line 253

def initialize(operation, lock)
  @operation = operation
  @lock = lock
end

Instance Method Details

#messageObject



258
259
260
# File 'lib/redis-lock.rb', line 258

def message
  "Trying to #{@operation} a lock has not been aquired: #{@lock}"
end