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)


17
18
19
20
# File 'lib/overcommit/hook/post_checkout/base.rb', line 17

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

#skip_file_checkout?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/overcommit/hook/post_checkout/base.rb', line 13

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