Add PDF detection

This commit is contained in:
Garen Torikian
2013-03-25 15:45:58 -07:00
parent 009bff6cc2
commit 4148ff1c29
2 changed files with 11 additions and 0 deletions

View File

@@ -158,6 +158,13 @@ module Linguist
extname.downcase == '.stl'
end
# Public: Is the blob a PDF?
#
# Return true or false
def pdf?
extname.downcase == '.pdf'
end
MEGABYTE = 1024 * 1024
# Public: Is the blob too big to load?