Skip to content

Instantly share code, notes, and snippets.

@jlaxson
Last active January 3, 2016 05:19
Show Gist options
  • Save jlaxson/8414422 to your computer and use it in GitHub Desktop.
Save jlaxson/8414422 to your computer and use it in GitHub Desktop.
Test code for the Listen gem
require 'rubygems'
require 'listen'
listener = Listen.to('.') do |modified, added, removed|
puts "modified absolute path: #{modified}"
puts "added absolute path: #{added}"
puts "removed absolute path: #{removed}"
end
listener.start # not blocking
sleep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment