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-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/util/file_watcher.rb
puppet-3.8.3 lib/puppet/util/file_watcher.rb
puppet-3.8.3-x86-mingw32 lib/puppet/util/file_watcher.rb
puppet-3.8.3-x64-mingw32 lib/puppet/util/file_watcher.rb
puppet-4.2.2 lib/puppet/util/file_watcher.rb
puppet-4.2.2-x86-mingw32 lib/puppet/util/file_watcher.rb
puppet-4.2.2-x64-mingw32 lib/puppet/util/file_watcher.rb
puppet-retrospec-0.8.0 vendor/gems/puppet-3.7.3/lib/puppet/util/file_watcher.rb
puppet-3.8.2 lib/puppet/util/file_watcher.rb
puppet-3.8.2-x86-mingw32 lib/puppet/util/file_watcher.rb
puppet-3.8.2-x64-mingw32 lib/puppet/util/file_watcher.rb
puppet-retrospec-0.7.3 vendor/gems/puppet-3.7.3/lib/puppet/util/file_watcher.rb
puppet-4.2.1 lib/puppet/util/file_watcher.rb
puppet-4.2.1-x86-mingw32 lib/puppet/util/file_watcher.rb
puppet-4.2.1-x64-mingw32 lib/puppet/util/file_watcher.rb
puppet-4.2.0 lib/puppet/util/file_watcher.rb
puppet-4.2.0-x86-mingw32 lib/puppet/util/file_watcher.rb
puppet-4.2.0-x64-mingw32 lib/puppet/util/file_watcher.rb
puppet-retrospec-0.7.2 vendor/gems/puppet-3.7.3/lib/puppet/util/file_watcher.rb
puppet-3.8.1 lib/puppet/util/file_watcher.rb