On this page
End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class · Ruby 3.2
SyntaxSuggest::DisplayCodeWithLineNumbers
Outputs code with highlighted lines
Whatever is passed to this class will be rendered even if it is “marked invisible” any filtering of output should be done before calling this class.
DisplayCodeWithLineNumbers.new(
lines: lines,
highlight_lines: [lines[2], lines[3]]
).call
# =>
1
2 def cat
> 3 Dir.chdir
> 4 end
5 end
6
Class methods 1
Instance methods 3
Constants
No documentation available
No documentation available