Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require_relative "user"
- thomas = User.new("Thomas", "Duchemin", "tduch@gmail.com", "1234567")
- jean = User.new("Jean", "Bon", "jbon@gmail.com", "122234567")
- victor = User.new("Victor", "Lego", "vlego@gmail.com", "123vvv4567")
- chloe = User.new("Chloé", "crossfit", "cloclo@gmail.com", "123rtyvvv4567")
- # p thomas.to_s
- # p jean.to_s
- # p victor.to_s
- # thomas.first_name = "Jacques"
- # p thomas.to_s
- # 4.times do
- # p thomas.change_password("wrong", "56789")
- # end
- # p thomas
- thomas.add_friend(jean)
- thomas.add_friend(victor)
- victor.add_friend(jean)
- [victor, thomas, jean].each do |user|
- chloe.add_friend(user)
- end
- # p chloe.common_friends_with(thomas)
- p chloe.friend_with?(jean)
- # thomas.friends.each { |friend| puts friend.full_name }
Add Comment
Please, Sign In to add comment