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:



9
10
11
12
13
# File 'lib/overcommit/hook_loader/base.rb', line 9

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)


19
20
21
# File 'lib/overcommit/hook_loader/base.rb', line 19

def load_hooks
  raise NotImplementedError
end