mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add Blob
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user