Welcome to mirror list, hosted at ThFree Co, Russian Federation.

license.rb « blob_viewer « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3427227ad26abf9d5d31b8f1fcd1c8d793d86f97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

module BlobViewer
  class License < Base
    include Auxiliary
    include Static

    self.partial_name = 'license'
    self.file_types = %i(license)
    self.binary = false

    def license
      project.repository.license
    end

    def render_error
      return if license

      :unknown_license
    end
  end
end