Method: Puppet::FileSystem.overlay
- Defined in:
- lib/puppet/file_system.rb
.overlay(*files, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Allows overriding the filesystem for the duration of the given block. The filesystem will only contain the given file(s).
25 26 27 28 29 30 31 |
# File 'lib/puppet/file_system.rb', line 25 def self.(*files, &block) old_impl = @impl @impl = Puppet::FileSystem::MemoryImpl.new(*files) yield ensure @impl = old_impl end |