Sha256: 230f66d2813354bcec6c2b9445a504b043dad7c34429c2a22f4c691d0d8c3d38

Contents?: true

Size: 348 Bytes

Versions: 2

Compression:

Stored size: 348 Bytes

Contents

require 'socket'
require 'i18n'

class Utils
  class << self
    def host_name
      unless @host_name
        begin
          @host_name = Socket.gethostbyname(Socket.gethostname).first
        rescue
          @host_name = Socket.gethostname
        end
      end

      @host_name
    end

    def t(*args)
      I18n.t(*args)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
runit-man-2.4.0a2 lib/runit-man/utils.rb
runit-man-2.4.0a1 lib/runit-man/utils.rb