gitlab-org--gitlab-foss/lib/container_registry/config.rb

20 lines
302 B
Ruby
Raw Normal View History

# 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
2016-05-17 10:41:47 -04:00
data[key]
end
end
end