class Puppet::Util::FileWatcher

Public Instance Methods

changed?() click to toggle source
# File lib/puppet/util/file_watcher.rb, line 12
def changed?
  @files.values.any?(&:changed?)
end
clear() click to toggle source
# File lib/puppet/util/file_watcher.rb, line 25
def clear
  @files.clear
end
each(&blk) click to toggle source
# File lib/puppet/util/file_watcher.rb, line 4
def each(&blk)
  @files.keys.each(&blk)
end
watch(filename) click to toggle source
# File lib/puppet/util/file_watcher.rb, line 16
def watch(filename)
  return if watching?(filename)
  @files[filename] = Puppet::Util::WatchedFile.new(filename)
end
watching?(filename) click to toggle source
# File lib/puppet/util/file_watcher.rb, line 21
def watching?(filename)
  @files.has_key?(filename)
end

Public Class Methods

new() click to toggle source
# File lib/puppet/util/file_watcher.rb, line 8
def initialize
  @files = {}
end