class Hookshot::Hook

Attributes

name[R]

Public Class Methods

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

Public Instance Methods

create() click to toggle source
# File lib/hookshot/hook.rb, line 12
def create
  puts "Creating empty #{@name} hook at #{path}…"
  FileUtils.touch(path)
end
path() click to toggle source
# File lib/hookshot/hook.rb, line 17
def path
  HooksDirectory.path.join(@name)
end