Skip to content

Instantly share code, notes, and snippets.

@sandro
Created October 12, 2009 17:18
Show Gist options
  • Save sandro/208550 to your computer and use it in GitHub Desktop.
Save sandro/208550 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'rev'
class SomeWatcher < Rev::StatWatcher
def initialize(watch_path)
super(watch_path)
puts "watching #{path}"
end
def on_change
puts "Change"
end
end
l = Rev::Loop.new :backend => :kqueue
w = SomeWatcher.new('./trial.rb')
w.attach l
l.run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment