mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add Blob#binary?
This commit is contained in:
@@ -26,8 +26,12 @@ module Linguist
|
||||
defined?(Grit::Submodule) && @blob.kind_of?(Grit::Submodule)
|
||||
end
|
||||
|
||||
def binary?
|
||||
mime_type == 'octet-stream' || !(text? || image?)
|
||||
end
|
||||
|
||||
def file?
|
||||
image? || !text? || mime_type == 'octet-stream'
|
||||
image? || binary?
|
||||
end
|
||||
|
||||
def text?
|
||||
|
||||
Reference in New Issue
Block a user