page 593 bottom, in the line before ref_meta_ruby/delegate_class.rb
pass the object to be delegated to the parameter class
is unclear (at least at first glance). I had to do some research. Without super
.../delegate.rb:405:in '__getobj__': not delegated (ArgumentError)
So calling super
is crucial. I would say something like that :
In the new class’s initialize method, call super
with the object to be delegated to the delegated class (the one given as parameter to DelegateClass).
or
In the new class’s initialize method, call super
with the object to be delegated to the class given as parameter to DelegateClass.
or closer to your sentence :
In the new class’s initialize method, call super
with the object to be delegated to this class (the parameter to DelegateClass).