You can reformat an entire Ruby document or a selected block of code to regularize the indenting automatically.
Format Document
The entire contents of a Ruby code file can be auto-formatted by selecting Edit, Advanced, Format Document (shortcut: CTRL+E,D)
Format Selection
The currently selected block of Ruby code can be auto-formatted by selecting Edit, Advanced, Format Selection (shortcut: CTRL+E,F)
See Also
Editing
The Code Editor