Class: Overcommit::Hook::PostCheckout::Base

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/overcommit/hook/post_checkout/base.rb

Overview

Functionality common to all post-checkout hooks.

Instance Attribute Summary

Attributes inherited from Base

#config

Instance Method Summary collapse

Methods inherited from Base

#applicable_files, #command, #description, #execute, #execute_in_background, #flags, #in_path?, #included_files, #initialize, #name, #parallelize?, #processors, #quiet?, #required?, #required_executable, #required_libraries, #run, #run?, #run_and_transform, #skip?

Constructor Details

This class inherits a constructor from Overcommit::Hook::Base

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


15
16
17
18
# File 'lib/overcommit/hook/post_checkout/base.rb', line 15

def enabled?
  return false if file_checkout? && skip_file_checkout?
  super
end

#skip_file_checkout?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/overcommit/hook/post_checkout/base.rb', line 11

def skip_file_checkout?
  @config['skip_file_checkout'] != false
end