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, #raw_lexer, #run, supports_truecolor?

Methods inherited from Rouge::CLI

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

Constructor Details

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

Class Method Details

.descObject



357
358
# File 'lib/rouge/cli.rb', line 357

def self.desc
end

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

Yields:

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


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

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



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

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

  out
end