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