Class: Socket
- Inherits:
-
Object
- Object
- Socket
- Defined in:
- lib/mobilize-ssh/extensions/socket.rb
Class Method Summary collapse
Class Method Details
.domain_name ⇒ Object
10 11 12 |
# File 'lib/mobilize-ssh/extensions/socket.rb', line 10 def Socket.domain_name Socket.official_hostname.split(".")[-2..-1].join(".") end |
.official_hostname ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/mobilize-ssh/extensions/socket.rb', line 2 def Socket.official_hostname begin Socket.gethostbyname(Socket.gethostname).first rescue Socket.gethostname end end |