compass/lib/vendor/fssm/monitor.rb

26 lines
399 B
Ruby
Raw Normal View History

class FSSM::Monitor
def initialize(options={})
@options = options
@backend = FSSM::Backends::Default.new
end
2009-09-03 05:42:59 +00:00
def path(*args, &block)
path = FSSM::Path.new(*args)
2009-09-03 05:42:59 +00:00
if block_given?
if block.arity == 1
block.call(path)
else
path.instance_eval(&block)
end
end
2009-09-03 05:42:59 +00:00
@backend.add_path(path)
path
end
2009-09-03 05:42:59 +00:00
def run
@backend.run
end
end