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

config.rb « container_registry « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aafa9b1c1820abbf49baf497dfc6e7b520433113 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module ContainerRegistry
  class Config
    attr_reader :tag, :blob, :data

    def initialize(tag, blob)
      @tag = tag
      @blob = blob
      @data = Gitlab::Json.parse(blob.data)
    end

    def [](key)
      return unless data

      data[key]
    end
  end
end