Sha256: 9afc39ab5bbbc09a56e0759cd6432e15387acb8f649659ff75df38118e11065b

Contents?: true

Size: 1.46 KB

Versions: 302

Compression:

Stored size: 1.46 KB

Contents

Monitor API
===========

There are three ways you can run the monitor.

1. call monitor with a path parameter, and define callbacks in a block
2. call monitor with a block to configure multiple paths and callbacks
3. create a monitor object and run each step manually

Monitor with path
-----------------

This form watches one path, and enters the run loop automatically. The first parameter is the path to watch, and the second parameter is an optional glob pattern or array of glob patterns that a file must match in order to trigger a callback. The default glob, if ommitted, is `'**/*'`.

	FSSM.monitor('/some/directory/', '**/*') do
	  update {|base, relative|}
	  delete {|base, relative|}
	  create {|base, relative|}
	end

Monitor with block
------------------

This form watches one or more paths, and enters the run loop automatically. The glob configuration call can be ommitted, and defaults to `'**/*'`.

	FSSM.monitor do
	  path '/some/directory/' do
	    glob '**/*.yml'
   
	    update {|base, relative|}
	    delete {|base, relative|}
	    create {|base, relative|}
	  end
 
	  path '/some/other/directory/' do
	    update {|base, relative|}
	    delete {|base, relative|}
	    create {|base, relative|}
	  end
	end

Monitor object
--------------

This form doesn't enter the run loop automatically.

	monitor = FSSM::Monitor.new

	monitor.path '/some/directory/' do
	  update {|base, relative|}
	  delete {|base, relative|}
	  create {|base, relative|}
	end

	monitor.run

Version data entries

302 entries across 302 versions & 6 rubygems

Version Path
ttilley-fssm-0.0.6 README.markdown
ttilley-fssm-0.0.7 README.markdown
ttilley-fssm-0.0.8 README.markdown
haml-3.1.3 vendor/sass/vendor/fssm/README.markdown
haml-3.2.0.alpha.8 vendor/sass/vendor/fssm/README.markdown
sass-3.1.4 vendor/fssm/README.markdown
sass-3.2.0.alpha.11 vendor/fssm/README.markdown
sass-3.1.3 vendor/fssm/README.markdown
sass-3.2.0.alpha.9 vendor/fssm/README.markdown
sass-3.2.0.alpha.8 vendor/fssm/README.markdown
haml-3.2.0.alpha.5 vendor/sass/vendor/fssm/README.markdown
haml-3.2.0.alpha.4 vendor/sass/vendor/fssm/README.markdown
haml-3.1.2 vendor/sass/vendor/fssm/README.markdown
sass-3.1.2 vendor/fssm/README.markdown
sass-3.2.0.alpha.7 vendor/fssm/README.markdown
sass-3.2.0.alpha.6 vendor/fssm/README.markdown
radiant-1.0.0.rc1 vendor/plugins/haml/vendor/fssm/README.markdown
haml-3.2.0.alpha.3 vendor/sass/vendor/fssm/README.markdown
sass-3.2.0.alpha.4 vendor/fssm/README.markdown
sass-3.2.0.alpha.3 vendor/fssm/README.markdown