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: 6751ea15a5d68bb9c2ccea149bcb7878761c4176 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module BlobViewer
  class License < Base
    include Auxiliary
    include Static

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

    def license
      blob.project.repository.license
    end

    def render_error
      return if license

      :unknown_license
    end
  end
end