RUBY-BEAUTIFY(1)

πŸ’… ruby-beautify(1) β€” the manual, but make it cute

okay bestie, sit down, hydrate, and let me tell you about ruby-beautify (and its little alias rbeautify) β€” it's a CLI binary that will pretty up your Ruby code. that's it. that's the whole job. it makes your Ruby look like it got its life together. ✨


πŸŽ€ NAME πŸŽ€

ruby-beautify, rbeautify β€” a CLI binary that will pretty up Ruby code. no cap. it takes your chaotic little end-less spaghetti and gives it main character energy. πŸ’–


✨ SYNOPSIS ✨

ruby-beautify [-hVts] [-c <count>] [--overwrite] [<file>...]

rbeautify [-hVts] [-c <count>] [--overwrite] [<file>...]

two names, same vibe. pick whichever one your fingers feel like typing. πŸ¦‹


🌸 OPTIONS 🌸

  • -h β€” show some help. a little "hi, here's how this works" moment. 🫢
  • -V, --version β€” show version. the "who am I, really" of it all. πŸ‘‘
  • -t, --tabs β€” use tab(s) as the indent character. team tabs, rise. 🧚
  • -s, --spaces β€” use space(s) as the indent character. team spaces, also rise. literally both are valid, i'm not fighting today. πŸ’œ
  • -c <count>, --indent_count <count> β€” the count of characters to use for indenting. you want 2? iconic. you want 4? also iconic. you're the one picking. ✨
  • --overwrite β€” overwrites file(s) in place. it's giving "we're editing the actual file, no take-backs." but lowkey it's polite: it won't overwrite files that fail syntax check. so if your code is broken, it just... doesn't. bless. πŸ™ˆ
  • <file>... β€” pretty up the provided file(s). as many as you want, queen. πŸ“
also super important: if it is run without specifying a filename, it will read from STDIN. so you can absolutely pipe things into it like the tech-savvy diva you are. 🌈

πŸ’– CONFIGURATION FILE πŸ’–

the options above? you don't have to type them every single time, bestie. you can set them inside a configuration file named .ruby-beautify, and you can place it anywhere up in the directory tree β€” it'll find it. no need to keep it right next to your code. πŸŽ€

options need to be separated by a new line, and any option that uses a parameter value requires a = to be added between the parameter name and the value. so it's name=value, not name value. periodt. πŸ’…


πŸ¦‹ HISTORY πŸ¦‹

the original analyzer that ruby-beautify was based on is available at: http://www.arachnoid.com/ruby/rubyBeautifier.html.

the original work is based on a sublime-text2 plugin: https://github.com/CraigWilliams/BeautifyRuby β€” which was cleaned up and made suitable for use directly in a shell. glow-up of the century, honestly. ✨

and then, plot twist: ruby-beautify was recently re-written to use the stdlib ripper gem to do the lexical analyzing. consequently, all of the old legacy code was dropped. it said "not me carrying that baggage into 2015" and walked out. πŸ’€πŸ”₯


πŸ‘‘ AUTHOR πŸ‘‘

Ernie Brodeur <ebrodeur@ujami.net>

this manpage was written by Tomasz Nitecki <tnnn@tnnn.pl> based on the original README.md. two icons, one manual. 🫢


🌸 DATE 🌸

2015-04-09


so yeah, that's the whole page, bestie. ruby-beautify β€” version/date 04/09/2015, straight from the RUBY-BEAUTIFY(1) manual. go forth and make your Ruby pretty. you ate. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from