Skip to content

Instantly share code, notes, and snippets.

@johnbintz
Created February 12, 2012 16:15
Show Gist options
  • Save johnbintz/1809410 to your computer and use it in GitHub Desktop.
Save johnbintz/1809410 to your computer and use it in GitHub Desktop.
For the lazy, how to Guard::Guard your own Guard
# Guardfile
require 'guard/guard'
class ::Guard::JohnIsAwesome < ::Guard::Guard
def start
puts "Whoa a guard."
end
def run_all
puts "Running all the codes"
end
def run_on_change(paths = [])
puts "Only running these: #{paths.inspect}"
end
end
guard 'john-is-awesome' do
watch(%r{^cats/dogs/.*})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment