Class: SwissAdmin::User

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

Class Method Summary collapse

Class Method Details

.activeObject



14
15
16
# File 'lib/swiss_admin/user/user.rb', line 14

def self.active
  ::ShellTastic::Command.run("w -s -h").first      
end

.currentObject



6
7
8
# File 'lib/swiss_admin/user/user.rb', line 6

def self.current
  ENV["USER"] || Etc.getlogin    
end

.homeObject



10
11
12
# File 'lib/swiss_admin/user/user.rb', line 10

def self.home
  Dir.home(Etc.getlogin)
end