Class: Shuttle::Hook

Inherits:
Object
  • Object
show all
Defined in:
lib/shuttle/hook.rb

Instance Method Summary collapse

Constructor Details

#initialize(deploy) ⇒ Hook

Returns a new instance of Hook.



3
4
5
# File 'lib/shuttle/hook.rb', line 3

def initialize(deploy)
  @deploy = deploy
end

Instance Method Details

#run(commands, allow_failures = false) ⇒ Object



7
8
9
10
11
# File 'lib/shuttle/hook.rb', line 7

def run(commands, allow_failures=false)
  [commands].flatten.compact.uniq.each do |cmd|
    execute(cmd, allow_failures)
  end
end