Module: SmartCore::Container::Mixin::ClassMethods Private

Defined in:
lib/smart_core/container/mixin.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.5.0

Instance Method Summary collapse

Instance Method Details

#containerSmartCore::Container

Returns:

Since:

  • 0.5.0



64
65
66
67
68
# File 'lib/smart_core/container/mixin.rb', line 64

def container
  @__smart_core_container_definition_lock__.synchronize do
    @__smart_core_container__ ||= @__smart_core_container_klass__.new
  end
end

#dependencies(&block) ⇒ void

This method returns an undefined value.

Parameters:

  • block (Proc)

Since:

  • 0.5.0



54
55
56
57
58
# File 'lib/smart_core/container/mixin.rb', line 54

def dependencies(&block)
  @__smart_core_container_definition_lock__.synchronize do
    @__smart_core_container_klass__.instance_eval(&block) if block_given?
  end
end