DEV Community

Discussion on: Future of Ruby – AST Tooling

flyerhzm profile image
Richard Huang

Hi Brandon, great article to introduce the Ruby AST Tooling, I implemented another AST tool, called synvert, which I used to speed up my rails upgrading work.

Different than the NodePattern, it defines a DSL language so that I just need to write some readable snippets to insert, replace or delete ruby code.

For examples
This snippet renames before_filter callbacks to before_action
This snippet converts [1, 2, 3].select { |v| v.even? } to [1, 2, 3].select(&:even?)

I think synvert could be another option for you, hope you like it.