Sha256: a0f9fe2dd8b6419b58837e3ea0ea1b6c39533aae7ad460c19a02f255d9440b3b

Contents?: true

Size: 412 Bytes

Versions: 28

Compression:

Stored size: 412 Bytes

Contents

module FSSM::Backends
  class Inotify
    def initialize
      @notifier = INotify::Notifier.new
    end

    def add_handler(handler, preload=true)
      @notifier.watch(handler.path.to_s, :all_events) do |event|
        handler.refresh(event.name)
      end

      handler.refresh(nil, true) if preload
    end

    def run
      begin
        @notifier.run
      rescue Interrupt
      end
    end

  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
compass-0.10.0.rc2 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.rc1 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.pre9 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.pre8 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.pre7 lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.pre6 lib/vendor/fssm/fssm/backends/inotify.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.8/gems/compass-0.10.0.pre5/lib/vendor/fssm/fssm/backends/inotify.rb
compass-0.10.0.pre5 lib/vendor/fssm/fssm/backends/inotify.rb