Sha256: 30adc3db9972f1226a0ae4fdeed730dd8bd29b082a87997bc423a7fb78e5b6f2
Contents?: true
Size: 338 Bytes
Versions: 18
Compression:
Stored size: 338 Bytes
Contents
# frozen_string_literal: true class CloudGovConfig ENV_VARIABLE = "VCAP_SERVICES" def self.dig(*path) return nil if ENV[ENV_VARIABLE].blank? first, *rest = path vcap_services[first]&.first&.dig(*rest) end def self.vcap_services @vcap_services ||= JSON.parse(ENV[ENV_VARIABLE]).with_indifferent_access end end
Version data entries
18 entries across 18 versions & 1 rubygems