gitlab-org--gitlab-foss/lib/container_registry/config.rb
gfyoung d598e4fd93 Enable more frozen string in lib/**/*.rb
Enables frozen for the following:

* lib/*.rb
* lib/banzai/**/*.rb
* lib/bitbucket/**/*.rb
* lib/constraints/**/*.rb
* lib/container_registry/**/*.rb
* lib/declarative_policy/**/*.rb

Partially addresses #47424.
2018-10-06 17:02:50 -07:00

18 lines
288 B
Ruby

# frozen_string_literal: true
module ContainerRegistry
class Config
attr_reader :tag, :blob, :data
def initialize(tag, blob)
@tag, @blob = tag, blob
@data = JSON.parse(blob.data)
end
def [](key)
return unless data
data[key]
end
end
end