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. github.com/xinminlabs/synvert-snip...
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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. github.com/xinminlabs/synvert-snip...
For examples
This snippet renames
before_filter
callbacks tobefore_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.