lib/pg_lock.rb
def lock!(exception_klass = PgLock::UnableToLockError)
    result = internal_lock { yield self if block_given? }
    if result == NO_LOCK
      raise exception_klass.new(name: name, attempts: max_attempts)
    end
    return result
  end
# A PgLock::UnableToLock is raised if the lock is not acquired.
A PgLock::UnableToLock is raised if the lock is not acquired.
A PgLock :: UnableToLock is raised if the lock is not acquired .
def lock!(exception_klass = PgLock::UnableToLockError)
    result = internal_lock { yield self if block_given? }
    if result == NO_LOCK
      raise exception_klass.new(name: name, attempts: max_attempts)
    end
    return result
  end
def lock! ( exception_klass = PgLock :: UnableToLockError ) result = internal_lock { yield self if block_given? } if result == NO_LOCK raise exception_klass . new ( name : name , attempts : max_attempts ) end return result end
A PgLock::UnableToLock is raised if the lock is not acquired.
A PgLock :: UnableToLock is raised if the lock is not acquired .
exception_klass