lib/vagrant/machine.rb
def communicate
      if !@communicator
        # For now, we always return SSH. In the future, we'll abstract
        # this and allow plugins to define new methods of communication.
        klass = Vagrant.plugin("2").manager.communicators[:ssh]
        @communicator = klass.new(self)
      end

      @communicator
    end
# Returns a communication object for executing commands on the remote
# machine. Note that the _exact_ semantics of this are up to the
# communication provider itself. Despite this, the semantics are expected
# to be consistent across operating systems. For example, all linux-based
# systems should have similar communication (usually a shell). All
# Windows systems should have similar communication as well. Therefore,
# prior to communicating with the machine, users of this method are
# expected to check the guest OS to determine their behavior.
#
# This method will _always_ return some valid communication object.
# The `ready?` API can be used on the object to check if communication
# is actually ready.
#
# @return [Object]
Returns a communication object for executing commands on the remote
machine. Note that the _exact_ semantics of this are up to the
communication provider itself. Despite this, the semantics are expected
to be consistent across operating systems. For example, all linux-based
systems should have similar communication (usually a shell). All
Windows systems should have similar communication as well. Therefore,
prior to communicating with the machine, users of this method are
expected to check the guest OS to determine their behavior.

This method will _always_ return some valid communication object.
The `ready?` API can be used on the object to check if communication
is actually ready.
Returns a communication object for executing commands on the remote machine . Note that the _exact_ semantics of this are up to the communication provider itself . Despite this the semantics are expected to be consistent across operating systems . For example all linux - based systems should have similar communication ( usually a shell ) . All Windows systems should have similar communication as well . Therefore prior to communicating with the machine users of this method are expected to check the guest OS to determine their behavior . This method will _always_ return some valid communication object . The ` ready? ` API can be used on the object to check if communication is actually ready .
def communicate
      if !@communicator
        klass = Vagrant.plugin("2").manager.communicators[:ssh]
        @communicator = klass.new(self)
      end
      @communicator
    end
def communicate if ! @communicator klass = Vagrant . plugin ( "2" ) . manager . communicators [ :ssh ] @communicator = klass . new ( self ) end @communicator end
Returns a communication object for executing commands on the remote
machine.
Returns a communication object for executing commands on the remote machine .
# For now, we always return SSH. In the future, we'll abstract # this and allow plugins to define new methods of communication.
None
Object