class Hookshot::GitHook

Public Class Methods

new(name:) click to toggle source
# File lib/hookshot/git_hook.rb, line 6
def initialize(name:)
  @name = name
end

Public Instance Methods

backup() click to toggle source
# File lib/hookshot/git_hook.rb, line 18
def backup
  puts "Existing #{path} found, moving to #{path}.old…"
  FileUtils.move(path, "#{path}.old")
end
file?() click to toggle source
# File lib/hookshot/git_hook.rb, line 14
def file?
  File.exist?(path)
end

Private Instance Methods

path() click to toggle source
# File lib/hookshot/git_hook.rb, line 28
        def path
  GitHooksDirectory.path.join(@name)
end