Skip to content

Instantly share code, notes, and snippets.

@jonatas
Created December 11, 2017 12:19
Show Gist options
  • Select an option

  • Save jonatas/d6653d2bc0fd9d98c8b8290f0afb9e38 to your computer and use it in GitHub Desktop.

Select an option

Save jonatas/d6653d2bc0fd9d98c8b8290f0afb9e38 to your computer and use it in GitHub Desktop.
require '../../fast/lib/fast'
class RenameToSeed < Parser::Rewriter
def on_send(node)
return unless Fast.match?(node, '(send nil :create)')
replace node.loc.selector, 'seed'
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment