Sha256: e5c82abf952bbb127c39747dba0dee37438608fb8a17839bccdc7392aeb63500

Contents?: true

Size: 387 Bytes

Versions: 4

Compression:

Stored size: 387 Bytes

Contents

#!/usr/bin/env ruby
require 'watchr'

def find_in_load_path(path)
  dir = (['.'] + $LOAD_PATH).uniq.detect {|p| Pathname(p).join(path).exist? }
  dir ? path.expand_path(dir) : nil
end

absolute_path = find_in_load_path(Pathname("watch-me-now.rb")) or abort("no script found in load path: watch-me-now.rb")
Watchr::Controller.new(Watchr::Script.new(absolute_path), Watchr.handler.new).run

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
watch-me-now-1.9.0 bin/watch-me-now
watch-me-now-1.8.0 bin/watch-me-now
watch-me-now-1.7.0 bin/watch-me-now
watch-me-now-1.6.0 bin/watch-me-now