Skip to content

Instantly share code, notes, and snippets.

@srveit
Created October 17, 2010 21:59
Show Gist options
  • Save srveit/631348 to your computer and use it in GitHub Desktop.
Save srveit/631348 to your computer and use it in GitHub Desktop.
Replace occurrences of assigns[:name] = value with assign(:name, value)
for f in `grep -nH -rl assigns --include=*.rb .`
do sed -e 's/assigns\[\(:.*\)\] = \(.*\)$/assign(\1, \2)/' -i $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment