Guest User

Untitled

a guest
Oct 26th, 2017
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. require_relative "user"
  2.  
  3. thomas = User.new("Thomas", "Duchemin", "tduch@gmail.com", "1234567")
  4. jean = User.new("Jean", "Bon", "jbon@gmail.com", "122234567")
  5. victor = User.new("Victor", "Lego", "vlego@gmail.com", "123vvv4567")
  6. chloe = User.new("Chloé", "crossfit", "cloclo@gmail.com", "123rtyvvv4567")
  7.  
  8. # p thomas.to_s
  9. # p jean.to_s
  10. # p victor.to_s
  11.  
  12. # thomas.first_name = "Jacques"
  13.  
  14. # p thomas.to_s
  15.  
  16. # 4.times do
  17. # p thomas.change_password("wrong", "56789")
  18. # end
  19.  
  20. # p thomas
  21.  
  22. thomas.add_friend(jean)
  23. thomas.add_friend(victor)
  24.  
  25. victor.add_friend(jean)
  26.  
  27. [victor, thomas, jean].each do |user|
  28. chloe.add_friend(user)
  29. end
  30.  
  31. # p chloe.common_friends_with(thomas)
  32.  
  33. p chloe.friend_with?(jean)
  34.  
  35. # thomas.friends.each { |friend| puts friend.full_name }
Add Comment
Please, Sign In to add comment