lib/ztk/ssh/private.rb
# Builds a human readable tag about our connection.  Used for internal
# logging purposes.
Builds a human readable tag about our connection.  Used for internal
logging purposes.
Builds a human readable tag about our connection . Used for internal logging purposes .
def tag
        tags = Array.new
        user_host = "#{config.user}@#{config.host_name}"
        port = (config.port ? ":#{config.port}" : nil)
        tags << [user_host, port].compact.join
        if config.proxy_host_name
          tags << " via "
          proxy_user_host = "#{config.proxy_user}@#{config.proxy_host_name}"
          proxy_port = (config.proxy_port ? ":#{config.proxy_port}" : nil)
          tags << [proxy_user_host, proxy_port].compact.join
        end
        tags.join.strip
      end
def tag tags = Array . new user_host = "#{config.user}@#{config.host_name}" port = ( config . port ? ":#{config.port}" : nil ) tags << [ user_host , port ] . compact . join if config . proxy_host_name tags << " via " proxy_user_host = "#{config.proxy_user}@#{config.proxy_host_name}" proxy_port = ( config . proxy_port ? ":#{config.proxy_port}" : nil ) tags << [ proxy_user_host , proxy_port ] . compact . join end tags . join . strip end
Builds a human readable tag about our connection.
Builds a human readable tag about our connection .