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.
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.
14 15 16 17 |
# File 'lib/qonfig/settings/callbacks.rb', line 14 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.
32 33 34 |
# File 'lib/qonfig/settings/callbacks.rb', line 32 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.
23 24 25 |
# File 'lib/qonfig/settings/callbacks.rb', line 23 def call thread_safe { callbacks.each(&:call) } end |