Hey, new here. I’ve been mucking about with Tempfile lately, mainly in
regards to using Ruby for web-coding. So with it in mind that I’m
on Tempfile from that angle, here are some quick improvements I’d like
This would close the tempfile, and move (rename) it to the path given
an argument. Now, a couple options arise after that (that I can think
it could either 1) reopen the file pointer at the new path, 2) return a
filepointer that’s opened at that path, or 3) keep the Tempfile pointer
closed. Another note would be that the function might perhaps be named
more fitting: “Tempfile#store!”.
Tempfile#basename (or maybe Tempfile#original_basename to avoid
naming conflicts down the road)
Just an attribute to hold the basename that was originally passed into
tempfile. This keeps people from parsing the basename out of the
name (in case the naming scheme changes down the road), and generally
things easier when you want to use store() as outlined above
And actually, that’s all I can think of.