Extract strategies for detecting the language

This commit is contained in:
Brandon Keepers
2014-11-03 08:15:20 -05:00
parent 8d7b4f81b4
commit fd32938cd8
5 changed files with 49 additions and 33 deletions

View File

@@ -3,6 +3,10 @@ module Linguist
class Heuristics
ACTIVE = true
def self.call(blob, languages)
find_by_heuristics(blob.data, langauges)
end
# Public: Given an array of String language names,
# apply heuristics against the given data and return an array
# of matching languages, or nil.