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