Module: RedisQueuedLocks::Config::DSL::ClassMethods Private

Defined in:
lib/redis_queued_locks/config/dsl.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.13.0

Instance Method Summary collapse

Instance Method Details

#config_setters ⇒ Hash<String,Block>

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.

NOTE:

1. Style/DefWithParentheses rubocop's cop incorrectly drops `()` from method definition
and breaks ruby code syntax. So this cop is disabled here;
2. attr_reader is not used cuz `steep` can't understand it form inside the class where
the current module is mixed;

Returns:

  • (Hash<String,Block>)

Since:

  • 1.13.0



19
# File 'lib/redis_queued_locks/config/dsl.rb', line 19

def config_setters()= @config_setters

#config_validators ⇒ Hash<String,Block>

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.

NOTE:

1. Style/DefWithParentheses rubocop's cop incorrectly drops `()` from method definition
and breaks ruby code syntax. So this cop is disabled here;
2. attr_reader is not used cuz `steep` can't understand it form inside the class where
the current module is mixed;

Returns:

  • (Hash<String,Block>)

Since:

  • 1.13.0



31
# File 'lib/redis_queued_locks/config/dsl.rb', line 31

def config_validators()= @config_validators

#setting(config_key, config_value) ⇒ 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:

  • config_key (String)
  • config_value (Any)

Since:

  • 1.13.0



49
50
51
52
53
# File 'lib/redis_queued_locks/config/dsl.rb', line 49

def setting(config_key, config_value)
  config_setters[config_key] = proc do |config|
    config[config_key] = config_value
  end
end

#validate(config_key, &validator) ⇒ Bool

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.

Parameters:

  • config_key (String)
  • validator (Block)

Returns:

  • (Bool)

Since:

  • 1.13.0



39
40
41
# File 'lib/redis_queued_locks/config/dsl.rb', line 39

def validate(config_key, &validator)
  config_validators[config_key] = validator
end