Experimental Ruby code formatter
Super experimental gem for auto-formatting Ruby files. AKA the code isn’t great, but things are kind of working.
Pronounced “pretty-erb”.
Add this line to your application’s Gemfile:
gem 'prettyrb'
And then execute:
$ bundle
Or install it globally:
$ gem install prettyrb
CLI:
$ prettyrb format FILE
or to re-write the file:
prettyrb write FILE
In Ruby code:
PrettyRb.new(source_code).format
rais/rails
and tests still passThe gem is available as open source under the terms of the MIT License.