Ruby code rewriter