Implementation of examples in GOOS book in ruby