Skip to content
On this page
class · Ruby 4.0

SyntaxSuggest::DisplayCodeWithLineNumbers

< Object 3 instance methods 1 class methods

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