Module: DBLock

Extended by:
Locking
Defined in:
lib/db_lock.rb,
lib/db_lock/lock.rb,
lib/db_lock/adapter.rb,
lib/db_lock/locking.rb,
lib/db_lock/adapter/base.rb,
lib/db_lock/adapter/mysql.rb,
lib/db_lock/adapter/postgres.rb,
lib/db_lock/adapter/sqlserver.rb

Defined Under Namespace

Modules: Adapter, Lock, Locking Classes: AlreadyLocked

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from Locking

with_lock

Instance Attribute Details

#db_handler=(value) ⇒ Object (writeonly)

Sets the attribute db_handler

Parameters:

  • value

    the value to set the attribute db_handler to.



13
14
15
# File 'lib/db_lock.rb', line 13

def db_handler=(value)
  @db_handler = value
end

Class Method Details

.db_handlerObject



15
16
17
18
# File 'lib/db_lock.rb', line 15

def self.db_handler
  # this must be an active record base object or subclass
  @db_handler || ActiveRecord::Base
end