config.rb
358 Bytes
require 'yaml'
class Test::Storage::Config
attr_accessor :model
def initialize(yml_file)
@config = YAML.load_file(yml_file)
end
def con(storage)
@config[storage.to_sym][:con]
end
def query(storage)
@config[storage.to_sym][@model.to_sym][:query]
end
def map(storage)
@config[storage.to_sym][@model.to_sym][:map]
end
end