Class: PublicIpChoice::AttachmentExecution

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-skytap/api/public_ip.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env, ip, iface) ⇒ AttachmentExecution

Returns a new instance of AttachmentExecution.


47
48
49
50
51
# File 'lib/vagrant-skytap/api/public_ip.rb', line 47

def initialize(env, ip, iface)
  @env = env
  @ip = ip
  @iface = iface
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env


45
46
47
# File 'lib/vagrant-skytap/api/public_ip.rb', line 45

def env
  @env
end

#ifaceObject (readonly)

Returns the value of attribute iface


45
46
47
# File 'lib/vagrant-skytap/api/public_ip.rb', line 45

def iface
  @iface
end

#ipObject (readonly)

Returns the value of attribute ip


45
46
47
# File 'lib/vagrant-skytap/api/public_ip.rb', line 45

def ip
  @ip
end

Class Method Details

.make(env, ip, iface) ⇒ Object


37
38
39
40
41
42
43
# File 'lib/vagrant-skytap/api/public_ip.rb', line 37

def self.make(env, ip, iface)
  if ip.attached?
    UseAttachmentExecution.new(env, ip, iface)
  else
    AttachAndUseExecution.new(env, ip, iface)
  end
end