lib/vagrant-vcloud/model/forwarded_port.rb in vagrant-vcloud-0.1.2 vs lib/vagrant-vcloud/model/forwarded_port.rb in vagrant-vcloud-0.2.0

- old
+ new

@@ -44,13 +44,15 @@ @guest_port = guest_port @host_port = host_port options ||= {} @auto_correct = false - @auto_correct = options[:auto_correct] if options.has_key?(:auto_correct) + if options.key?(:auto_correct) + @auto_correct = options[:auto_correct] + end @guest_ip = options[:guest_ip] || nil @host_ip = options[:host_ip] || nil - @protocol = options[:protocol] || "tcp" + @protocol = options[:protocol] || 'tcp' end # This corrects the host port and changes it to the given new port. # # @param [Integer] new_port The new port