Module: Qonfig::Configurable::ClassMethods Private

Defined in:
lib/qonfig/configurable.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:

  • 0.2.0

Instance Method Summary collapse

Instance Method Details

#configQonfig::DataSet

Returns:

Since:

  • 0.2.0



76
77
78
79
80
# File 'lib/qonfig/configurable.rb', line 76

def config
  @__qonfig_definition_lock__.synchronize do
    @__qonfig_config__ ||= @__qonfig_config_klass__.new
  end
end

#configuration(&block) ⇒ void

This method returns an undefined value.

Parameters:

  • block (Proc)

Since:

  • 0.2.0



54
55
56
57
58
# File 'lib/qonfig/configurable.rb', line 54

def configuration(&block)
  @__qonfig_definition_lock__.synchronize do
    @__qonfig_config_klass__.instance_eval(&block) if block_given?
  end
end

#configure(options_map = {}, &block) ⇒ void

This method returns an undefined value.

Parameters:

  • options_map (Hash) (defaults to: {})
  • block (Proc)

Since:

  • 0.2.0



66
67
68
69
70
# File 'lib/qonfig/configurable.rb', line 66

def configure(options_map = {}, &block)
  @__qonfig_access_lock__.synchronize do
    config.configure(options_map, &block)
  end
end