class Object
Public Instance Methods
sub_pattern(match, replacement)
click to toggle source
Need one of these for replaceing shit.
# File bin/rails-graft, line 47 def sub_pattern(match, replacement) `sed -i "" -e "s/#{match}/#{replacement}/g" #{@controller_file_path}` `sed -i "" -e "s/#{match}/#{replacement}/g" #{@model_file_path}` Dir.glob("#{@view_path}/*.*") do |file| `sed -i "" -e "s/#{match}/#{replacement}/g" #{file}` end end