Class: FSSM::Monitor

### Home Classes Methods

### In Files

- lib/fssm/monitor.rb

### Parent

Object

### Methods

- ::new
- #file
- #path
- #run

### Class/Module Index

Quicksearch

- FSSM
- FSSM::Backends
- FSSM::Backends::Inotify
- FSSM::Backends::Polling
- FSSM::Backends::RBFSEvent
- FSSM::Monitor
- FSSM::Path
- FSSM::Pathname
- FSSM::State
- FSSM::State::Directory
- FSSM::State::File
- FSSM::Support
- FSSM::Tree
- FSSM::Tree::Cache
- FSSM::Tree::CacheDebug
- FSSM::Tree::Node
- FSSM::Tree::NodeBase
- FSSM::Tree::NodeEnumerable
- FSSM::Tree::NodeInsertion

No matching classes.

# FSSM::Monitor

### Public Class Methods

new(options={}) click to toggle source

    # File lib/fssm/monitor.rb, line 2
    def initialize(options={})
      @options = options
      @backend = FSSM::Backends::Default.new
    end

### Public Instance Methods

file(path=nil, glob=nil, &block) click to toggle source

    # File lib/fssm/monitor.rb, line 16
    def file(path=nil, glob=nil, &block)
      path = create_path(path, glob, &block)
      @backend.add_handler(FSSM::State::File.new(path))
      path
    rescue FSSM::FileNotRealError => e
      FSSM.dbg("#{e}")
      nil
    end

path(path=nil, glob=nil, &block) click to toggle source

    # File lib/fssm/monitor.rb, line 7
    def path(path=nil, glob=nil, &block)
      path = create_path(path, glob, &block)
      @backend.add_handler(FSSM::State::Directory.new(path, @options))
      path
    rescue FSSM::FileNotRealError => e
      FSSM.dbg("#{e}")
      nil
    end

run() click to toggle source

    # File lib/fssm/monitor.rb, line 25
    def run
      @backend.run
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.