module Showdown::WatchDog

Check file change.

Public Instance Methods

file_changed?() click to toggle source
# File lib/showdown.rb, line 19
def file_changed?
  @old_file_mtime ||= File.stat(@target_path).mtime

  if File.stat(@target_path).mtime > @old_file_mtime
    @old_file_mtime = File.stat(@target_path).mtime
    true
  else
    false
  end
end