Rubify¶ ↑
This is a collection of tools to grab abstract syntax trees from other languages (using external parsers) and convert them into Ruby. From there we can perform some idiomizing transformations, and then spit out cleanly-formatted Ruby code from ruby_scribe.
Requirements¶ ↑
This gem requires jruby as we currently extract AST’s using Eclipse’s solid language parser / AST interface.
Also required is ruby_scribe which can be used to write out ruby files.
Usage¶ ↑
Rubifying PHP Files¶ ↑
# Cat out the Ruby version of a PHP file $ rubify cat php my_file.php # Convert a file or directory of PHP files and converts to Ruby $ rubify convert php my_php_project new_ruby_project
Rubifying Java Files¶ ↑
# Cat out the Ruby version of a PHP file $ rubify cat php my_file.php # Convert a file or directory of PHP files and converts to Ruby $ rubify convert php my_php_project new_ruby_project