Playing around with graph search with Ruby.