Posts tagged with “ruby”
July 23
This is a video of a sample application I made using rbvimeo.
11:45 PM | 0 Comments | Tags: ruby, rails, rbvimeoDocument Monitoring in Ruby
# This program watches a file for changes. Whenever a change is made, it # prints a message in the terminal. require 'ftools' log_file = "test.log" last_change = File.mtime(log_file) while(true) if File.readable?(log_file) && (file_time = File.mtime(log_file)) > last_change last_change = file_time puts "Log has been updated" end end09:04 PM | 0 Comments | Tags: ruby