Class: Rouge::CLI::Debug

Inherits:
Highlight show all
Defined in:
lib/rouge/cli.rb

Instance Attribute Summary

Attributes inherited from Highlight

#escape, #formatter, #input_file, #lexer_name, #mimetype

Class Method Summary collapse

Methods inherited from Highlight

#escape_lexer, #initialize, #input, #input_stream, #lexer, #lexer_class, parse, parse_cgi, #raw_lexer, #run, supports_truecolor?

Methods inherited from Rouge::CLI

class_from_arg, error!, #error!, #initialize, normalize_syntax, parse

Constructor Details

This class inherits a constructor from Rouge::CLI::Highlight

Class Method Details

.descObject



355
356
# File 'lib/rouge/cli.rb', line 355

def self.desc
end

.doc {|%|usage: rougify debug [<options>]|| ... } ⇒ Object

Yields:

  • (%|usage: rougify debug [<options>]|)


358
359
360
361
362
363
364
365
366
# File 'lib/rouge/cli.rb', line 358

def self.doc
  return enum_for(:doc) unless block_given?

  yield %|usage: rougify debug [<options>]|
  yield %||
  yield %|Debug a lexer. Similar options to `rougify highlight`, but|
  yield %|defaults to the `null` formatter, and ensures the `debug`|
  yield %|option is enabled, to print debugging information to stdout.|
end

.parse_opts(argv) ⇒ Object



368
369
370
371
372
373
374
# File 'lib/rouge/cli.rb', line 368

def self.parse_opts(argv)
  out = super(argv)
  out[:lexer_opts]['debug'] = '1'
  out[:formatter] = 'null'

  out
end