#Recipe to Clean Up Ugly Ruby
ack -l "######" | xargs ruby -i.bak -ne 'print if not /######/'
# check with git diff
find . | grep '\.bak$' | xargs rm
gem install ruby-beautify
rbenv rehash
#!/bin/bash
rbeautify $1 > tmp
cat tmp > $1
...now beautify
find . -type f | grep '\.rb$' | xargs -L 1 ./little_script