Module: DBLock::Lock

Extended by:
Lock
Included in:
Lock
Defined in:
lib/db_lock/lock.rb

Instance Method Summary collapse

Instance Method Details

#get(name, timeout = 0, &block) ⇒ Object



7
8
9
# File 'lib/db_lock/lock.rb', line 7

def get(name, timeout = 0, &block)
  DBLock.with_lock(name, timeout, &block)
end

#locked?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/db_lock/lock.rb', line 11

def locked?
  DBLock.send(:locked?)
end