Class: SmartCore::Initializer::Settings::StrictOptions Private
- Defined in:
- lib/smart_core/initializer/settings/strict_options.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.
Instance Method Summary collapse
- #assign(value) ⇒ void private
- #resolve ⇒ Boolean private
Methods inherited from Base
Constructor Details
This class inherits a constructor from SmartCore::Initializer::Settings::Base
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.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/smart_core/initializer/settings/strict_options.rb', line 24 def assign(value) @lock.write_sync do raise( SmartCore::Initializer::SettingArgumentError, ":strict_options setting should be a type of boolean (got: `#{value.class}`)" ) unless value.is_a?(::TrueClass) || value.is_a?(::FalseClass) @value = value end end |
#resolve ⇒ 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.
12 13 14 15 16 |
# File 'lib/smart_core/initializer/settings/strict_options.rb', line 12 def resolve @lock.read_sync do (@value == nil) ? SmartCore::Initializer::Configuration[:strict_options] : @value end end |