Class: Machinery::CurrentUser

Inherits:
Object
  • Object
show all
Defined in:
lib/current_user.rb

Overview

Represents the user under which Machinery is running.

Instance Method Summary collapse

Instance Method Details

#is_root?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/current_user.rb', line 24

def is_root?
  Process.euid == 0
end

#usernameObject



20
21
22
# File 'lib/current_user.rb', line 20

def username
  ENV["USER"]
end