Sha256: 349cd91a9985e63efa59db511665469739ed5dc45097f0a2f1017199be18e289
Contents?: true
Size: 409 Bytes
Versions: 23
Compression:
Stored size: 409 Bytes
Contents
require 'erb' require 'yaml' class Ridgepole::Config def self.load(config, env = 'development') config = if File.exist?(config) yaml = ERB.new(File.read(config)).result YAML.load(yaml) else YAML.load(ERB.new(config).result) end if config.has_key?(env.to_s) config.fetch(env.to_s) else config end end end
Version data entries
23 entries across 23 versions & 1 rubygems