Class: Watch
- Inherits:
-
Object
- Object
- Watch
- Defined in:
- lib/watch.rb
Instance Method Summary collapse
-
#initialize(glob, &block) ⇒ Watch
constructor
A new instance of Watch.
Constructor Details
#initialize(glob, &block) ⇒ Watch
Returns a new instance of Watch.
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/watch.rb', line 2 def initialize(glob, &block) raise "must pass a block" unless block_given? @path = glob @files = [] @block = block @block.call run_loop end |