class Pushwagner::Hooks::Local
Attributes
after[R]
before[R]
environment[R]
Public Class Methods
new(env, local)
click to toggle source
# File lib/pushwagner/hooks.rb, line 121 def initialize(env, local) @environment = env @before = local['before'] || [] @after = local['after'] || [] end
Public Instance Methods
run(target)
click to toggle source
# File lib/pushwagner/hooks.rb, line 127 def run(target) local_exec(method(target).call) end
Private Instance Methods
local_exec(cmds)
click to toggle source
# File lib/pushwagner/hooks.rb, line 132 def local_exec(cmds) cmds.each do |cmd| Pushwagner.info "Executing `#{cmd}` locally..." system("#{cmd}") end end