module Pygments
Pygments
provides access to the Pygments
library via a pipe and a long-running Python process.
Constants
- VERSION
Public Class Methods
engine()
click to toggle source
# File lib/pygments.rb, line 16 def engine Thread.current.thread_variable_get(:pygments_engine) || Thread.current.thread_variable_set(:pygments_engine, Pygments::Popen.new) end
lexer_name_for(*args)
click to toggle source
# File lib/pygments.rb, line 21 def lexer_name_for(*args) names = engine.lexer_names_for(*args) names&.[](0) end
lexers()
click to toggle source
# File lib/pygments.rb, line 12 def lexers LexerCache.instance.raw_lexers end