From 2e1b953662f81f0ec5a18530d6ae64facb4c372a Mon Sep 17 00:00:00 2001 From: Abdelkader Boudih Date: Sun, 3 Mar 2024 19:19:18 +0100 Subject: [PATCH] feat!: rename impl_class to with_advisory_impl_class fixes #83 --- lib/with_advisory_lock/concern.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/with_advisory_lock/concern.rb b/lib/with_advisory_lock/concern.rb index 66587ce..005aeb0 100644 --- a/lib/with_advisory_lock/concern.rb +++ b/lib/with_advisory_lock/concern.rb @@ -19,12 +19,12 @@ def with_advisory_lock!(lock_name, options = {}, &block) end def with_advisory_lock_result(lock_name, options = {}, &block) - impl = impl_class.new(connection, lock_name, options) + impl = with_advisory_lock_impl_class.new(connection, lock_name, options) impl.with_advisory_lock_if_needed(&block) end def advisory_lock_exists?(lock_name) - impl = impl_class.new(connection, lock_name, 0) + impl = with_advisory_lock_impl_class.new(connection, lock_name, 0) impl.already_locked? || !impl.yield_with_lock.lock_was_acquired? end @@ -35,7 +35,7 @@ def current_advisory_lock private - def impl_class + def with_advisory_lock_impl_class adapter = WithAdvisoryLock::DatabaseAdapterSupport.new(connection) if adapter.postgresql? WithAdvisoryLock::PostgreSQL