Deprecate find_by_shebang

This class doesn’t need to know about shebangs.
This commit is contained in:
Brandon Keepers
2014-11-27 13:18:51 -05:00
parent ffe2ccf1f6
commit 9020d7c044
2 changed files with 16 additions and 38 deletions

View File

@@ -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.