Hacker News new | ask | show | jobs
by djur 4308 days ago
Idiomatic Ruby would not use inheritance in this case. 'Node' is a duck type and doesn't need to be explicitly defined. In 2004 this would have been written for an audience more conversant in C++ and Java, where you'd need to use an abstract base class and an interface respectively.