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