2018-10-06 23:10:08 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-05-09 19:14:46 +00:00
|
|
|
module ContainerRegistry
|
2016-05-04 12:22:54 +00:00
|
|
|
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
|
2016-05-17 14:41:47 +00:00
|
|
|
|
2016-05-04 12:22:54 +00:00
|
|
|
data[key]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|