Sha256: eebbfb7dc6540eb361518aec6d297b35ca8bfbfbbd02477065a1869af6684bcc

Contents?: true

Size: 430 Bytes

Versions: 761

Compression:

Stored size: 430 Bytes

Contents

class Puppet::Util::FileWatcher
  include Enumerable

  def each(&blk)
    @files.keys.each(&blk)
  end

  def initialize
    @files = {}
  end

  def changed?
    @files.values.any?(&:changed?)
  end

  def watch(filename)
    return if watching?(filename)
    @files[filename] = Puppet::Util::WatchedFile.new(filename)
  end

  def watching?(filename)
    @files.has_key?(filename)
  end

  def clear
    @files.clear
  end
end

Version data entries

761 entries across 761 versions & 3 rubygems

Version Path
puppet-3.3.0.rc2 lib/puppet/util/file_watcher.rb