Class: TestbotCloud::Server::Factory
- Inherits:
-
Object
- Object
- TestbotCloud::Server::Factory
- Defined in:
- lib/server/factory.rb
Class Method Summary collapse
Class Method Details
.create(compute, opts, server) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/server/factory.rb', line 10 def self.create(compute, opts, server) if server.is_a?(Fog::Brightbox::Compute::Server) Brightbox.new(compute, opts, server) elsif server.is_a?(Fog::AWS::Compute::Server) AWS.new(compute, opts, server) else raise "Unsupported server type: #{server}" end end |