summaryrefslogtreecommitdiff
path: root/app/models/blob_viewer/license.rb
blob: 57355f2c3aa13b8b076b205e0cf8c1d433e38ff1 (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
      project.repository.license
    end

    def render_error
      return if license

      :unknown_license
    end
  end
end