Flowdock
method

getaddress

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: Net::FTP

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1_9_1_378) is shown here.

These similar methods exist in v1_9_3_392:

getaddress() private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/net/ftp.rb, line 366
    def getaddress
      thishost = Socket.gethostname
      if not thishost.index(".")
        thishost = Socket.gethostbyname(thishost)[0]
      end
      if ENV.has_key?("LOGNAME")
        realuser = ENV["LOGNAME"]
      elsif ENV.has_key?("USER")
        realuser = ENV["USER"]
      else
        realuser = "anonymous"
      end
      return realuser + "@" + thishost
    end
Register or log in to add new notes.