One of the best books I’ve ever read is Fun Home by Alison Bechdel. Her portrait of growing up gay in a small town with secrets everywhere is heartbreaking and breathtaking and everyone should read it. It transcends LGBT issues and speaks to all of us who’ve ever lived and suffered through lies.
In the book, Alison develops a pretty severe case of Obesessive-Compulsive Disorder to control the bogeyman she has to live with (her father). She creates rituals like counting the cracks in each floor board as she crosses the threshold from one room to another. This pathological performance piece worked very much like an each loop in ruby: With each floorboard, Alison would pass the board to her OCS method (i.e., each) and proceed to sum the number of cracks in the board. We can quantify the disorder as such:
OCD = 0
floorboard.each do |crack|
OCD += crack