Use mime binary

This commit is contained in:
Joshua Peek
2011-06-03 10:44:21 -05:00
parent d9990aed06
commit 40efc2bd44
3 changed files with 20 additions and 12 deletions

View File

@@ -110,6 +110,13 @@ module Linguist
@content_type ||= Mime.content_type_for(extname)
end
# Public: Is the path binary?
#
# Return true or false
def binary?
@binary ||= Mime.binary?(extname)
end
def to_s
@path.dup
end