Module: Foobara::StateMachine::Callbacks
- Includes:
- Concern
- Included in:
- Foobara::StateMachine
- Defined in:
- foobara-0.0.110/projects/state_machine/src/callbacks.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#callback_registry ⇒ Object
Returns the value of attribute callback_registry.
Instance Method Summary collapse
Methods included from Concern
foobara_class_methods_module_for, foobara_concern?, included
Instance Attribute Details
#callback_registry ⇒ Object
Returns the value of attribute callback_registry.
6 7 8 |
# File 'foobara-0.0.110/projects/state_machine/src/callbacks.rb', line 6 def callback_registry @callback_registry end |
Instance Method Details
#initialize ⇒ Object
8 9 10 |
# File 'foobara-0.0.110/projects/state_machine/src/callbacks.rb', line 8 def initialize(...) self.callback_registry = Callback::Registry::ChainedConditioned.new(self.class.class_callback_registry) end |
#register_transition_callback(type) ⇒ Object
21 22 23 |
# File 'foobara-0.0.110/projects/state_machine/src/callbacks.rb', line 21 def register_transition_callback(type, **, &) callback_registry.register_callback(type, **, &) end |