Module: RedisQueuedLocks::Debugger Private

Defined in:
lib/redis_queued_locks/debugger.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Defined Under Namespace

Modules: Interface

Constant Summary collapse

DEBUG_ENABLED_METHOD =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (String)

Since:

  • 1.0.0

<<~METHOD_DECLARATION.strip.freeze
  def debug(message) = STDOUT.write("#\{message}\n")
METHOD_DECLARATION
DEBUG_DISABLED_MEHTOD =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Returns:

  • (String)

Since:

  • 1.0.0

<<~METHOD_DECLARATION.strip.freeze
  def debug(message); end
METHOD_DECLARATION

Class Method Summary collapse

Class Method Details

.debug(message) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • message (String)

Since:

  • 1.0.0



60
# File 'lib/redis_queued_locks/debugger.rb', line 60

def debug(message); end

.disable! ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Since:

  • 1.0.0



42
43
44
45
# File 'lib/redis_queued_locks/debugger.rb', line 42

def disable!
  @enabled = false
  eval(DEBUG_DISABLED_MEHTOD)
end

.enable! ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Since:

  • 1.0.0



33
34
35
36
# File 'lib/redis_queued_locks/debugger.rb', line 33

def enable!
  @enabled = true
  eval(DEBUG_ENABLED_METHOD)
end

.enabled? ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)

Since:

  • 1.0.0



51
52
53
# File 'lib/redis_queued_locks/debugger.rb', line 51

def enabled?
  @enabled
end