Merge pull request #360 from skalnik/add-solid-support

Add Blob#solid? helper
This commit is contained in:
Ted Nyman
2013-02-01 14:24:36 -08:00
5 changed files with 132 additions and 0 deletions

View File

@@ -142,6 +142,13 @@ module Linguist
['.png', '.jpg', '.jpeg', '.gif'].include?(extname)
end
# Public: Is the blob a support 3D model format?
#
# Return true or false
def solid?
['.stl', '.obj'].include?(extname)
end
MEGABYTE = 1024 * 1024
# Public: Is the blob too big to load?