Learning Processing by Daniel Shiffman is an book that serves as a gentle introduction to the theory and practice of programming. It works by introducing code concepts over the course of 23 chapters, and creating a series of examples that build on them. Daniel Shiffman is a professor of the Interactive Telecommunications Program at New York University.
These samples have been ported over to Ruby-Processing here.
Daniel Shiffman, has written another book The Nature of Code which has also been ported to ruby-processing here.