Sure, here's a partial (but functional) implementation of the Cell class used in the book. It is not advanced Ruby, but the author does not spend any time teaching Ruby concepts - this code snippet appears early on in the first chapter and the assumption is the reader can understand it:
Sure, here's a partial (but functional) implementation of the
Cell
class used in the book. It is not advanced Ruby, but the author does not spend any time teaching Ruby concepts - this code snippet appears early on in the first chapter and the assumption is the reader can understand it:And the simplest algorithm:
Basic building blocks, but you do need to know what, for example,
attr_accessor
meansI'm following along in TypeScript and finding the translation straightforward.
Thanks, I almost understand it.