Module: DevSuite::Utils::Construct::Config::Hook::HookRegistry

Defined in:
lib/dev_suite/utils/construct/config/hook/hook_registry.rb

Instance Method Summary collapse

Instance Method Details

#hooksObject

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