Guest User

Untitled

a guest
Apr 24th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #1. Give a privacy setting for your whatsapp DP
  2. # 2. Setting
  3. # Everybody can see my DP
  4. # Only Me
  5. # Only my contact
  6.  
  7. class Mobile
  8. def notification
  9. puts "Privacy to my whatsapp DP"
  10. puts "Everybody can see my DP"
  11. end
  12. private
  13. def dp_setting(message)
  14. puts message
  15. end
  16. protected
  17. def dp_to_contact(message)
  18. puts message
  19. end
  20. end
  21.  
  22. class User < Mobile
  23. def accessability
  24. notification
  25. dp_setting("Only Me can see my DP")
  26. Mobile.new.dp_to_contact("Only my contact can see my DP.")
  27. end
  28. end
  29.  
  30. user = User.new
  31. user.accessability
  32. # mbl = Mobile.new
  33. # mbl.dp_setting rescue puts "you cannot see my DP"
  34. # mbl.dp_to_contact rescue puts "you cannot access my DP"
Add Comment
Please, Sign In to add comment