Class: PuppetLibrary::Util::TempDir::Remover

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_library/util/temp_dir.rb

Instance Method Summary collapse

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