Method: Pathname#delete!
- Defined in:
- lib/pleasant_path/pathname.rb
#delete! ⇒ self
Recursively deletes the directory or file indicated by the Pathname. Similar to Pathname#rmtree, but does not raise an exception if the file does not exist. Returns the Pathname.
354 355 356 357 |
# File 'lib/pleasant_path/pathname.rb', line 354 def delete! self.rmtree if self.exist? self end |