Module: Qonfig::Configurable::InstanceMethods 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



91
92
93
94
95
# File 'lib/qonfig/configurable.rb', line 91

def config
  self.class.instance_variable_get(:@__qonfig_definition_lock__).synchronize do
    @__qonfig_config__ ||= self.class.instance_variable_get(:@__qonfig_config_klass__).new
  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



111
112
113
114
115
# File 'lib/qonfig/configurable.rb', line 111

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

#shared_configQonfig::DataSet

Returns:

Since:

  • 0.6.0



101
102
103
# File 'lib/qonfig/configurable.rb', line 101

def shared_config
  self.class.config
end