Sha256: ddea1a04d3e5055fc85b6dda8c9b6f221b07f26dd4519641486de57a6d21ebde
Contents?: true
Size: 480 Bytes
Versions: 45
Compression:
Stored size: 480 Bytes
Contents
module Kubes::Hooks class Runner include Kubes::Util::Sh include Kubes::Logging def initialize(hook) @hook = hook @execute = @hook["execute"] end def run case @execute when String sh(@execute, exit_on_fail: @hook["exit_on_fail"]) when -> (e) { e.respond_to?(:public_instance_methods) && e.public_instance_methods.include?(:call) } @execute.new.call else @execute.call end end end end
Version data entries
45 entries across 45 versions & 1 rubygems