Class: RedisLock::IfLocked
- Defined in:
- lib/redis_lock/if_locked.rb
Instance Attribute Summary
Attributes inherited from Semaphore
Instance Method Summary collapse
Methods inherited from Semaphore
Constructor Details
This class inherits a constructor from RedisLock::Semaphore
Instance Method Details
#call(&block) ⇒ Object
3 4 5 6 |
# File 'lib/redis_lock/if_locked.rb', line 3 def call(&block) return :open if lock.open? _perform(&block) end |