2018-10-04 05:16:51 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Applicable for blob classes with project attribute
|
|
|
|
module BlobLanguageFromGitAttributes
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
def language_from_gitattributes
|
2019-02-08 07:19:53 -05:00
|
|
|
return unless project
|
2018-10-04 05:16:51 -04:00
|
|
|
|
|
|
|
repository = project.repository
|
|
|
|
repository.gitattribute(path, 'gitlab-language')
|
|
|
|
end
|
|
|
|
end
|