Module: DevSuite::Utils::Construct::Config::Hook::HookRegistry
- Defined in:
- lib/dev_suite/utils/construct/config/hook/hook_registry.rb
Instance Method Summary collapse
-
#hooks ⇒ Object
Retrieves the hooks registered for this class.
-
#register_hook(stage, &block) ⇒ Object
Registers a hook for a specific stage.
Instance Method Details
#hooks ⇒ Object
Retrieves the hooks registered for this class
16 17 18 |
# File 'lib/dev_suite/utils/construct/config/hook/hook_registry.rb', line 16 def hooks @hooks ||= {} end |
#register_hook(stage, &block) ⇒ Object
Registers a hook for a specific stage
10 11 12 13 |
# File 'lib/dev_suite/utils/construct/config/hook/hook_registry.rb', line 10 def register_hook(stage, &block) hooks[stage] ||= [] hooks[stage] << block end |