Class: VagrantPlugins::Skytap::Connection::PublicIpChoice
- Defined in:
- lib/vagrant-skytap/connection/public_ip_choice.rb
Defined Under Namespace
Classes: AttachAndUseExecution, PublicIpAttachmentExecution, UseExecution
Instance Attribute Summary collapse
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
Attributes inherited from Choice
#env, #execution, #iface, #validation_error_message
Instance Method Summary collapse
- #choose ⇒ Object
-
#initialize(env, ip, iface) ⇒ PublicIpChoice
constructor
A new instance of PublicIpChoice.
Methods inherited from Choice
Constructor Details
#initialize(env, ip, iface) ⇒ PublicIpChoice
Returns a new instance of PublicIpChoice.
31 32 33 34 35 36 |
# File 'lib/vagrant-skytap/connection/public_ip_choice.rb', line 31 def initialize(env, ip, iface) @env = env @ip = ip @iface = iface @execution = PublicIpAttachmentExecution.make(env, iface, ip) end |
Instance Attribute Details
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
29 30 31 |
# File 'lib/vagrant-skytap/connection/public_ip_choice.rb', line 29 def ip @ip end |
Instance Method Details
#choose ⇒ Object
38 39 40 41 42 43 |
# File 'lib/vagrant-skytap/connection/public_ip_choice.rb', line 38 def choose execution.execute host = ip.address [host, DEFAULT_PORT] end |