def for_hook(hook, hook_type = nil)
      unless hook_type
        components = hook.class.name.split('::')
        hook = components.last
        hook_type = components[-2]
      end

      # Merge hook configuration with special 'ALL' config
      hook_config = smart_merge(@hash[hook_type]['ALL'], @hash[hook_type][hook] || {})

      # Need to specially handle `enabled` option since not setting it does not
      # necessarily mean the hook is disabled
      hook_config['enabled'] = hook_enabled?(hook_type, hook)

      hook_config.freeze
    end
def for_hook(hook, hook_type = nil)
      unless hook_type
        components = hook.class.name.split('::')
        hook = components.last
        hook_type = components[-2]
      end

      # Merge hook configuration with special 'ALL' config
      hook_config = smart_merge(@hash[hook_type]['ALL'], @hash[hook_type][hook] || {})

      # Need to specially handle `enabled` option since not setting it does not
      # necessarily mean the hook is disabled
      hook_config['enabled'] = hook_enabled?(hook_type, hook)

      hook_config.freeze
    end
Returns a non-modifiable configuration for a hook.