debian-mirror-gitlab/lib/gitlab/ci/build/hook.rb
2023-03-04 22:38:38 +05:30

24 lines
445 B
Ruby

# frozen_string_literal: true
module Gitlab
module Ci
module Build
class Hook
attr_reader :name, :script
class << self
def from_hooks(job)
job.options[:hooks].to_a.map do |name, script|
new(name.to_s, script)
end
end
end
def initialize(name, script)
@name = name
@script = script
end
end
end
end
end