Skip to content

Instantly share code, notes, and snippets.

@robie1373
Created October 11, 2012 20:57
Show Gist options
  • Save robie1373/3875431 to your computer and use it in GitHub Desktop.
Save robie1373/3875431 to your computer and use it in GitHub Desktop.
listener experiment
require 'listen'
path1 = File.join(ENV['home'], ".ruth")
path2 = File.join(ENV['home'], "foo")
hrm = Proc.new do |modified, added, removed|
p removed.inspect
end
listener = Listen.to(path2)
listener = listener.change(&hrm)
listener.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment