Method: File.read_and_remove
- Defined in:
- lib/picolena/templates/lib/core_exts.rb
.read_and_remove(filename) ⇒ Object
Returns the content of a file and removes it after. Could be used to read temporary output file written by a PlainTextExtractor.
100 101 102 103 104 |
# File 'lib/picolena/templates/lib/core_exts.rb', line 100 def self.read_and_remove(filename) content=read(filename) FileUtils.rm filename, :force=>true content end |