Project

prettyrb

0.0
No release in over 3 years
Low commit activity in last 3 years
Ruby source code formatter
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1.4
~> 5.0
~> 0.13
~> 12.3.3
~> 0.18

Runtime

~> 2.7.0.5
>= 0
 Project Readme

Prettyrb

Super experimental gem for auto-formatting Ruby files. AKA the code isn't great, but things are kind of working.

Pronounced "pretty-erb".

Installation

Add this line to your application's Gemfile:

gem 'prettyrb'

And then execute:

$ bundle

Or install it globally:

$ gem install prettyrb

Usage

CLI:

$ prettyrb format FILE

or to re-write the file:

prettyrb write FILE

In Ruby code:

PrettyRb.new(source_code).format

Does it work?

  • Formats self and tests still pass
  • Formats rais/rails and tests still pass
  • Keeps comments

License

The gem is available as open source under the terms of the MIT License.