Sha256: eaf7cdc62a59b1755ab8a6d014c2447e2b55fd055a1a5854cfbcdb48fde03fe6
Contents?: true
Size: 535 Bytes
Versions: 15
Compression:
Stored size: 535 Bytes
Contents
require 'socket' require 'i18n' # Utilities. class Utils class << self # Gets local host name. # @return [String] Host name. # @note Caches host name on first access. def host_name unless @host_name begin @host_name = Socket.gethostbyname(Socket.gethostname).first rescue @host_name = Socket.gethostname end end @host_name end # I18n.t shortcut. # @return [String] Translated string. def t(*args) I18n.t(*args) end end end
Version data entries
15 entries across 15 versions & 1 rubygems