module Pygments
Pygments
provides access to the Pygments
library via a pipe and a long-running Python process.
Constants
- VERSION
Public Class Methods
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
Source
# File lib/pygments.rb, line 21 def lexer_name_for(*args) names = engine.lexer_names_for(*args) names&.[](0) end