class Coppertone::Utils::HostUtils

A utility class that includes methods for working with data about the host.

Public Class Methods

clear_hostname() click to toggle source
# File lib/coppertone/utils/host_utils.rb, line 17
def self.clear_hostname
  @hostname = nil
end
hostname() click to toggle source
# File lib/coppertone/utils/host_utils.rb, line 8
def self.hostname
  @hostname ||=
    begin
      Socket.gethostbyname(Socket.gethostname).first
    rescue SocketError
      Socket.gethostname
    end
end