fork(1) download
  1. puts("Input your id")
  2. input_id = gets.chomp()
  3.  
  4. def login(_id)
  5. members = ['egoing', 'k8805', 'leezche']
  6. for member in members do
  7. if member == _id
  8. return true
  9. end
  10. end
  11. return false
  12. end
  13.  
  14. if login(input_id)
  15. puts('Hello, '+input_id)
  16. else
  17. puts('Who are you?')
  18. end
  19.  
Success #stdin #stdout 0.01s 7456KB
stdin
egoing
stdout
Input your id
Hello, egoing