Class: SmartCore::Initializer::Settings::Base Private

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_core/initializer/settings/base.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.8.0

Version:

  • 0.10.0

Direct Known Subclasses

AutoCast, StrictOptions, TypeSystem

Instance Method Summary collapse

Constructor Details

#initializevoid

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.

Since:

  • 0.8.0

Version:

  • 0.10.0



12
13
14
15
# File 'lib/smart_core/initializer/settings/base.rb', line 12

def initialize
  @value = nil
  @lock = SmartCore::Engine::ReadWriteLock.new
end

Instance Method Details

#assign(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:

  • value (Any)

Raises:

Since:

  • 0.8.0



# File 'lib/smart_core/initializer/settings/base.rb', line 22

#dupSmartCore::Initializer::Settings::Base

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:

Since:

  • 0.8.0

Version:

  • 0.10.0



34
35
36
37
38
39
40
# File 'lib/smart_core/initializer/settings/base.rb', line 34

def dup
  @lock.write_sync do
    self.class.new.tap do |duplicate|
      duplicate.instance_variable_set(:@value, @value)
    end
  end
end

#resolveAny

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:

  • (Any)

Since:

  • 0.8.0



# File 'lib/smart_core/initializer/settings/base.rb', line 17