class Docwatch::Watcher

Public Class Methods

new(file_path) click to toggle source
# File lib/docwatch/watcher.rb, line 3
def initialize(file_path)
    @file_path = file_path
end

Public Instance Methods

mtime() click to toggle source
# File lib/docwatch/watcher.rb, line 7
def mtime
    File.mtime(@file_path)
end
wait() click to toggle source
# File lib/docwatch/watcher.rb, line 11
def wait
    now = mtime
    sleep 0.2 while mtime <= now
end