Skip to content
seamusabshere edited this page Jun 27, 2012 · 3 revisions
  • maybe tail should return a File object and you can do a read() on it to get source or path() on it to get path
  • yah i mean you could just have all the commands return an instance of a special kind of object that responds to #to_path, #to_s, and delegates all other methods to one or the other (whichever makes more sense)
  • (you could also provide a #destructively method via closure that deletes that shit)
  • i.e. UnixUtils.untar('fo.tar').destructively.to_s
  • yah i mean for legacy reasons you could delegate other methods to #to_path, since that's basically what you're using now
  • but you could also have #to_file (File.open(to_path))
  • #to_io
  • whatever

Clone this wiki locally