Class: RSpecSystem::NodeSet

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec-system/node_set.rb

Overview

Factory class for NodeSet.

Defined Under Namespace

Classes: Base, Vagrant, Vsphere

Class Method Summary collapse

Class Method Details

.create(setname, config, virtual_env, options) ⇒ RSpecSystem::NodeSet::Base

Returns a NodeSet object.

Returns:



8
9
10
11
12
13
14
15
16
17
# File 'lib/rspec-system/node_set.rb', line 8

def self.create(setname, config, virtual_env, options)
  case(virtual_env)
  when 'vagrant'
    RSpecSystem::NodeSet::Vagrant.new(setname, config, options)
  when 'vsphere'
    RSpecSystem::NodeSet::Vsphere.new(setname, config, options)
  else
    raise "Unsupported virtual environment #{virtual_env}"
  end
end