Ruby In Steel outlines your code so that you can selectively hide code blocks such as classes, modules, methods and programming constructs such as if and while blocks. In .rhtml files, code collapses on matching tags such as <body></body>. Note that collapsing is dependent upon correct syntax. In .rhtml files, matching pairs of opening and closing tags are required. Click the plus (+) or minus (-) symbols on the left side of the editor window to toggle code folding.
Automatic Code Outlining
In Ruby source files, Ruby In Steel automatically provides code folding based on the following syntax elements:
-
classes
-
modules
-
methods
-
case statements
-
if blocks
-
while, unless, until, for loops
-
=begin/=end comment blocks
-
blocks { and } or do and end delimited
In addition to automatic code-folding, you may explicitly collapse or expand selected blocks of code using the following features:
Mark and Collapse
If code blocks aren’t automatically outlined, you can mark and collapse any code you wish using the mouse. This lets you hide ‘free standing’ code areas or comment blocks, for example.
![]() |
View Tooltip of Collapsed Area: For a fast view of the hidden text in a collapsed area, hover your mouse over the three dots indicating a collapsed area [...]. This will display the hidden code in a tooltip. |
Collapse To Definitions
To collapse to all 'top-level' outlines (e.g. all the Class headers in a file containing many classes) right-click in the editor and select, Outlining, Collapse To Definitions.
Hide Selection
You can optionally collapse areas which are not normally collapsed (e.g. a comment block). Mark the area using the mouse then right-click and select Hide Selection.
Toggle All Outlining
Use the other options on the Outlining menu (right-click in the editor) to toggle the outlining display throughout the current file.
See Also
Editing
Code Coloring
The Code Editor
