2018-12-13 13:39:08 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Applicable for blob classes with project attribute
|
|
|
|
module BlobLanguageFromGitAttributes
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
def language_from_gitattributes
|
2019-07-07 11:18:12 +05:30
|
|
|
return unless project
|
2018-12-13 13:39:08 +05:30
|
|
|
|
|
|
|
repository = project.repository
|
|
|
|
repository.gitattribute(path, 'gitlab-language')
|
|
|
|
end
|
|
|
|
end
|