Module: BlobLanguageFromGitAttributes

Extended by:
ActiveSupport::Concern
Included in:
Blob, Gitlab::Search::FoundBlob
Defined in:
app/models/concerns/blob_language_from_git_attributes.rb

Instance Method Summary collapse

Instance Method Details

#language_from_gitattributesObject


6
7
8
9
10
# File 'app/models/concerns/blob_language_from_git_attributes.rb', line 6

def language_from_gitattributes
  return unless repository&.exists?

  repository.gitattribute(path, 'gitlab-language')
end