Skip to content

Instantly share code, notes, and snippets.

@opsb
Created February 4, 2011 12:36
Show Gist options
  • Save opsb/811061 to your computer and use it in GitHub Desktop.
Save opsb/811061 to your computer and use it in GitHub Desktop.
def stop_tomcat
puts "stopping tomcat"
end
def start_tomcat
puts "starting tomcat"
end
def restart
stop_tomcat
yield
start_tomcat
end
restart do
puts "doing stuff while tomcat is shutdown"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment