class Rouge::Guessers::GlobMapping
def self.by_pairs(mapping, filename)
def self.by_pairs(mapping, filename) glob_map = {} mapping.each do |(glob, lexer_name)| lexer = Lexer.find(lexer_name) # ignore unknown lexers next unless lexer glob_map[lexer.name] ||= [] glob_map[lexer.name] << glob end new(glob_map, filename) end