Class: Overcommit::HookLoader::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/overcommit/hook_loader/base.rb

Overview

Responsible for loading hooks from a file.

Direct Known Subclasses

BuiltInHookLoader, PluginHookLoader

Instance Method Summary collapse

Constructor Details

#initialize(config, context, logger) ⇒ Base

Returns a new instance of Base.

Parameters:



7
8
9
10
11
# File 'lib/overcommit/hook_loader/base.rb', line 7

def initialize(config, context, logger)
  @config = config
  @context = context
  @log = logger
end

Instance Method Details

#load_hooksArray<Hook>

When implemented in subclasses, loads the hooks for which that subclass is responsible.

Returns:

Raises:

  • (NotImplementedError)


17
18
19
# File 'lib/overcommit/hook_loader/base.rb', line 17

def load_hooks
  raise NotImplementedError
end