Sha256: f828e4e207289c21f67331d81cdfa02297ab61d5e3472721bc42629dff8e0e6a

Contents?: true

Size: 243 Bytes

Versions: 2

Compression:

Stored size: 243 Bytes

Contents

def load_namespaced_config(file)
  namespace = File.basename(file, File.extname(file))
  config = YAML.load(ERB.new(IO.read(File.expand_path("../config/#{file}", __FILE__))).result)
  config.inject({}){|h,(k,v)| h["#{namespace}_#{k}"]=v;h}
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
multi_config-0.1.1 spec/support/config_helper.rb
multi_config-0.1.0 spec/support/config_helper.rb