Class: Qonfig::Settings::Callbacks Private
- Inherits:
-
Object
- Object
- Qonfig::Settings::Callbacks
- Includes:
- Enumerable
- Defined in:
- lib/qonfig/settings/callbacks.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.
Defined Under Namespace
Classes: Validation
Instance Method Summary collapse
- #add(callback) ⇒ void private
- #call ⇒ void private
- #initialize ⇒ void constructor private
Constructor Details
#initialize ⇒ 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.
16 17 18 19 |
# File 'lib/qonfig/settings/callbacks.rb', line 16 def initialize @callbacks = [] @lock = Mutex.new end |
Instance Method Details
#add(callback) ⇒ 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.
34 35 36 |
# File 'lib/qonfig/settings/callbacks.rb', line 34 def add(callback) thread_safe { callbacks << callback } end |
#call ⇒ 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.
25 26 27 |
# File 'lib/qonfig/settings/callbacks.rb', line 25 def call thread_safe { callbacks.each(&:call) } end |