Class: SmartCore::Initializer::Plugins::Abstract Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_core/initializer/plugins/abstract.rb

Overview

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

Since:

  • 0.1.0

Version:

  • 0.10.0

Direct Known Subclasses

ThyTypes

Class Method Summary collapse

Class Method Details

.inherited(child_klass) ⇒ 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:

  • child_klass (Class)

Since:

  • 0.1.0

Version:

  • 0.10.0



14
15
16
17
18
# File 'lib/smart_core/initializer/plugins/abstract.rb', line 14

def inherited(child_klass)
  child_klass.instance_variable_set(:@__loaded__, false)
  child_klass.instance_variable_set(:@__lock__, SmartCore::Engine::Lock.new)
  super
end

.load!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:

  • 0.1.0



24
25
26
27
28
29
30
31
# File 'lib/smart_core/initializer/plugins/abstract.rb', line 24

def load!
  __thread_safe__ do
    unless @__loaded__
      @__loaded__ = true
      install!
    end
  end
end

.loaded?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:

  • 0.1.0



37
38
39
# File 'lib/smart_core/initializer/plugins/abstract.rb', line 37

def loaded?
  __thread_safe__ { @__loaded__ }
end