class Quay::EnvLookup
Public Class Methods
new(state)
click to toggle source
# File lib/quay/env_lookup.rb, line 3 def initialize(state) @state = state end
Public Instance Methods
get(value)
click to toggle source
# File lib/quay/env_lookup.rb, line 7 def get(value) name, path = value.match(/\$(\w+):(.*)/).captures id = @state.containers[name] container = Docker::Container.get(id) json = container.json path.split("/").reduce(json) do |current, key| current[key] end end