Do something similar to replace.rb