This commit is contained in:
Brandon Keepers
2014-11-03 08:54:11 -05:00
parent 815337299a
commit 74fa4b9b75
4 changed files with 8 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
module Linguist
module Strategy
# Detects language based on filename and/or extension
class Filename
def self.call(blob, _)
name = blob.name.to_s
@@ -12,7 +13,6 @@ module Linguist
name += ".script!"
end
# First try to find languages that match based on filename.
Language.find_by_filename(name)
end
end