This commit is contained in:
Joshua Peek
2011-05-11 22:08:12 -05:00
parent b424c32bb4
commit 39bd49950e
5 changed files with 75 additions and 31 deletions

View File

@@ -37,19 +37,6 @@ module Linguist
mime_type.split('/').first
end
def file?
image? || !text? || mime_type == 'octet-stream'
end
def text?
media_type == 'text' ||
mime_type == 'application/json'
end
def image?
['.png', '.jpg', '.jpeg', '.gif'].include?(extname)
end
def to_s
@path.dup
end