Guest User

Untitled

a guest
Apr 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. #
  2. # The dumbest piece of code I've EVER written.
  3. #
  4. # I REALLY don't know WTF I was thinking, or not thinking.
  5. # I must have been drunk and asleep while I wrote this method.
  6. #
  7. # It's not only stupid, but IT DOESN'T EVEN WORK! *stabs self in face*
  8. #
  9.  
  10. def stupid_method
  11. data = fetch.some(:data)
  12. if !(data.prop_1 == "something" && data.prop_2 == "something else")
  13. @result = false
  14. else
  15. @result = true
  16. end
  17. @result = true
  18. end
  19.  
  20.  
  21. #
  22. # Looking at it today, I fixed it in 30 seconds after screaming
  23. # "WHAT THE FUCK?!?" for 25 seconds.
  24. #
  25.  
  26. def stupid_method
  27. data = fetch.some(:data)
  28. @result = false
  29. if data.prop_1 == "something" && data.prop_2 == "something else"
  30. @result = true
  31. end
  32. end
Add Comment
Please, Sign In to add comment