Module: TempPathname
- Defined in:
- lib/temp_path.rb
Overview
module TempPath
Instance Method Summary collapse
-
#clean ⇒ Object
This method remove your temporary pathname.
- #temp? ⇒ Boolean
Instance Method Details
#clean ⇒ Object
This method remove your temporary pathname. You do not need to call this method if you provide a block when you create a tempfile.
144 145 146 147 148 149 150 151 152 |
# File 'lib/temp_path.rb', line 144 def clean if exist? if directory? rmtree else unlink end end end |
#temp? ⇒ Boolean
154 155 156 |
# File 'lib/temp_path.rb', line 154 def temp? true end |