Sha256: 839ed085112a16e496fd563b41041dd5c40214d008739f628f331558a102f38f

Contents?: true

Size: 354 Bytes

Versions: 1

Compression:

Stored size: 354 Bytes

Contents

# Loads a namespaced config. Similar to the load method in MultiConfig::ORMs::ActiveRecord::Config.path method
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

1 entries across 1 versions & 1 rubygems

Version Path
multi_config-0.1.6 spec/support/config_helper.rb