class Dry::Monitor::LDAP::Colorizers::Rouge
Attributes
formatter[R]
lexer[R]
Public Class Methods
new(theme)
click to toggle source
# File lib/dry/monitor/ldap/colorizers/rouge.rb, line 19 def initialize(theme) @formatter = ::Rouge::Formatters::Terminal256.new(theme || ::Rouge::Themes::Gruvbox.new) @lexer = ::Rouge::Lexers::LDAP.new end
Public Instance Methods
call(string)
click to toggle source
# File lib/dry/monitor/ldap/colorizers/rouge.rb, line 24 def call(string) formatter.format(lexer.lex(string)) end