2016-05-09 15:14:46 -04:00
|
|
|
module ContainerRegistry
|
2016-05-04 08:22:54 -04: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 10:41:47 -04:00
|
|
|
|
2016-05-04 08:22:54 -04:00
|
|
|
data[key]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|