You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
358 B
21 lines
358 B
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
|