8 Sep
2010
8 Sep
'10
4:31 p.m.
On 8 Sep 2010, at 17:22, Matt Aimonetti wrote:
3) If I have an empty init, e.g., def init; super; self; end Can I always delete the empty init and get the same result through inheritance?
Yes. Ruby will look for the method in your subclass, then go up the class hierarchy to the superclass and check there for the method there, calling it if it's found. So a method that just contains 'super' [although not 'super()' as that calls super with no arguments] is doing the same job as the method not being defined in the subclass. C --- Caius Durling caius@caius.name +44 (0) 7960 268 100 http://caius.name/