connection_factory (Capistrano::Configuration::Connections)

    # File lib/capistrano/configuration/connections.rb, line 87
          def connection_factory
            @connection_factory ||= begin
              if exists?(:gateway)
                logger.debug "establishing connection to gateway `#{fetch(:gateway)}'"
                GatewayConnectionFactory.new(fetch(:gateway), self)
              else
                DefaultConnectionFactory.new(self)
              end
            end
          end