Since ruby allow for really easy overriding of objects and classes, I decided to make it easier and cleaner to move my files. Here is how you currently do it:
I know this isn’t a huge deal, but I would like to clean it up a little bit. I used an initializer (RAILS_ROOT/config/initializers/core_extensions.rb) to override the String class as such:
class String def move(to = nil) if to && File.exist?(self) FileUtils.move(self, to) end end end
This allows me to do the following to move files:
I though it was pretty cool!