mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Expose lexer list
This commit is contained in:
@@ -53,6 +53,10 @@ module Linguist
|
||||
@lexer_index[lexer]
|
||||
end
|
||||
|
||||
def self.lexers
|
||||
@lexer_index.to_a
|
||||
end
|
||||
|
||||
def initialize(attributes = {})
|
||||
@name = attributes[:name] || raise(ArgumentError, "missing name")
|
||||
@lexer = attributes[:lexer] || default_lexer
|
||||
|
||||
Reference in New Issue
Block a user