Class: VpnChoice::AttachmentExecution
- Defined in:
- lib/vagrant-skytap/api/vpn.rb
Direct Known Subclasses
ConnectAttachmentExecution, CreateAttachmentExecution, UseAttachmentExecution
Instance Attribute Summary collapse
-
#attachment ⇒ Object
readonly
Returns the value of attribute attachment.
-
#env ⇒ Object
readonly
Returns the value of attribute env.
-
#iface ⇒ Object
readonly
Returns the value of attribute iface.
-
#vpn ⇒ Object
readonly
Returns the value of attribute vpn.
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(env, vpn, iface, attachment = nil) ⇒ AttachmentExecution
constructor
A new instance of AttachmentExecution.
- #verb ⇒ Object
Constructor Details
#initialize(env, vpn, iface, attachment = nil) ⇒ AttachmentExecution
Returns a new instance of AttachmentExecution.
60 61 62 63 64 65 |
# File 'lib/vagrant-skytap/api/vpn.rb', line 60 def initialize(env, vpn, iface, =nil) @env = env @vpn = vpn @iface = iface @attachment = end |
Instance Attribute Details
#attachment ⇒ Object (readonly)
Returns the value of attribute attachment.
46 47 48 |
# File 'lib/vagrant-skytap/api/vpn.rb', line 46 def @attachment end |
#env ⇒ Object (readonly)
Returns the value of attribute env.
46 47 48 |
# File 'lib/vagrant-skytap/api/vpn.rb', line 46 def env @env end |
#iface ⇒ Object (readonly)
Returns the value of attribute iface.
46 47 48 |
# File 'lib/vagrant-skytap/api/vpn.rb', line 46 def iface @iface end |
#vpn ⇒ Object (readonly)
Returns the value of attribute vpn.
46 47 48 |
# File 'lib/vagrant-skytap/api/vpn.rb', line 46 def vpn @vpn end |
Class Method Details
.make(env, vpn, iface) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/vagrant-skytap/api/vpn.rb', line 48 def self.make(env, vpn, iface) = iface.(vpn) if .try(:connected?) UseAttachmentExecution.new(env, vpn, iface, ) elsif ConnectAttachmentExecution.new(env, vpn, iface, ) else CreateAttachmentExecution.new(env, vpn, iface) end end |