Class: PuppetLibrary::Util::TempDir::Remover
- Inherits:
-
Object
- Object
- PuppetLibrary::Util::TempDir::Remover
- Defined in:
- lib/puppet_library/util/temp_dir.rb
Instance Method Summary collapse
- #call(*args) ⇒ Object
-
#initialize(path) ⇒ Remover
constructor
A new instance of Remover.
Constructor Details
#initialize(path) ⇒ Remover
Returns a new instance of Remover.
53 54 55 |
# File 'lib/puppet_library/util/temp_dir.rb', line 53 def initialize(path) @path = path end |
Instance Method Details
#call(*args) ⇒ Object
57 58 59 60 61 |
# File 'lib/puppet_library/util/temp_dir.rb', line 57 def call(*args) if File.directory? @path FileUtils.rm_rf @path end end |