Module: FSSM

Defined in:
lib/fssm.rb,
lib/fssm/version.rb,
lib/fssm/pathname.rb

Defined Under Namespace

Modules: Backends, State, Support, Tree Classes: Monitor, Path, Pathname

Constant Summary collapse

FSSMError =
Class.new(StandardError)
FileNotFoundError =
Class.new(FSSMError)
FileNotRealError =
Class.new(FSSMError)
CallbackError =
Class.new(FSSMError)
VERSION =
"0.2.10"

Class Method Summary collapse

Class Method Details

.dbg(msg = nil) ⇒ Object



61
62
63
# File 'lib/fssm.rb', line 61

def dbg(msg=nil)
  STDERR.puts("FSSM -> #{msg}")
end

.monitor(*args, &block) ⇒ Object



65
66
67
68
69
70
71
# File 'lib/fssm.rb', line 65

def monitor(*args, &block)
  options = args[-1].is_a?(Hash) ? args.pop : {}
  monitor = FSSM::Monitor.new(options)
  FSSM::Support.use_block(args.empty? ? monitor : monitor.path(*args), block)

  monitor.run
end