class ProviderFactory def create(config) path = File.join File.dirname(__FILE__), 'providers', config['provider'], config['version'], 'provider.rb' load path Provider.new config end end