Module: Tidings

Defined in:
lib/tidings.rb,
lib/tidings/version.rb,
lib/tidings/watcher.rb

Overview

Contains the complete Tidings implementation.

Tidings.watch(File.expand_path('~/Code`)) { |file| pp file }

Defined Under Namespace

Classes: Watcher

Constant Summary collapse

VERSION =
'0.4.0'

Class Method Summary collapse

Class Method Details

.log(message) ⇒ Object



19
20
21
# File 'lib/tidings.rb', line 19

def self.log(message)
  warn("Tidings: #{message}") if $DEBUG
end

.watch(path, processor = nil, &block) ⇒ Object



23
24
25
26
27
# File 'lib/tidings.rb', line 23

def self.watch(path, processor = nil, &block)
  watcher = Tidings::Watcher.new(path, processor || block)
  watcher.start
  watcher
end