Class: Utils

Inherits:
Object
  • Object
show all
Defined in:
lib/runit-man/utils.rb

Class Method Summary collapse

Class Method Details

.host_nameObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/runit-man/utils.rb', line 6

def host_name
  unless @host_name
    begin
      @host_name = Socket.gethostbyname(Socket.gethostname).first
    rescue
      @host_name = Socket.gethostname
    end
  end
  @host_name
end

.t(*args) ⇒ Object



17
18
19
# File 'lib/runit-man/utils.rb', line 17

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