Skip to content

Running Programmatically

rdp edited this page Sep 13, 2010 · 6 revisions

Example


require 'watchr'
script = Watchr::Script.new
script.watch('foo') { puts 'bar' } # this call doesn't block

The Script class’s tests use it that way: http://github.com/mynyml/watchr/blob/master/test/test_script.rb

You can also look at other projects that use watchr as a lib:

  • http://github.com/francois/autotestr
  • http://github.com/viking/autowatchr
Clone this wiki locally