mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Deprecate find_by_shebang
This class doesn’t need to know about shebangs.
This commit is contained in:
@@ -199,18 +199,9 @@ module Linguist
|
||||
@extension_index[extname]
|
||||
end
|
||||
|
||||
# Public: Look up Languages by shebang line.
|
||||
#
|
||||
# data - Array of tokens or String data to analyze.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# Language.find_by_shebang("#!/bin/bash\ndate;")
|
||||
# # => [#<Language name="Bash">]
|
||||
#
|
||||
# Returns the matching Language
|
||||
# DEPRECATED
|
||||
def self.find_by_shebang(data)
|
||||
@interpreter_index[Linguist.interpreter_from_shebang(data)]
|
||||
@interpreter_index[Shebang.interpreter(data)]
|
||||
end
|
||||
|
||||
# Public: Look up Languages by interpreter.
|
||||
|
||||
Reference in New Issue
Block a user