Class: Overcommit::Installer

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

Overview

Manages the installation of Overcommit hooks in a git repository.

Instance Method Summary collapse

Constructor Details

#initialize(logger) ⇒ Installer



6
7
8
# File 'lib/overcommit/installer.rb', line 6

def initialize(logger)
  @log = logger
end

Instance Method Details

#run(target, options) ⇒ Object



10
11
12
13
14
15
# File 'lib/overcommit/installer.rb', line 10

def run(target, options)
  @target = target
  @options = options
  validate_target
  @options[:action] == :uninstall ? uninstall : install
end