Module: PasswordCallback

Defined in:
lib/nventory.rb

Constant Summary collapse

@@password =
nil

Class Method Summary collapse

Class Method Details

.get_passwordObject



43
44
45
46
47
48
49
50
51
# File 'lib/nventory.rb', line 43

def self.get_password
  while !@@password
    system "stty -echo"
    print "Password: "
    @@password = $stdin.gets.chomp
    system "stty echo"
  end
  @@password
end