Class: MagicShelf::FileCleaner
- Inherits:
-
Object
- Object
- MagicShelf::FileCleaner
- Defined in:
- lib/magicshelf/filecleaner.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
Instance Method Summary collapse
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file.
7 8 9 |
# File 'lib/magicshelf/filecleaner.rb', line 7 def file @file end |
Instance Method Details
#enter ⇒ Object
9 10 11 12 |
# File 'lib/magicshelf/filecleaner.rb', line 9 def enter() #raise MagicShelf::FileCleanerError.new("workdir is not set") if @workdir == nil yield end |
#process ⇒ Object
14 15 16 |
# File 'lib/magicshelf/filecleaner.rb', line 14 def process() FileUtils.remove_file(@file) end |