On this page
Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class · Ruby 3.4
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