In today’s free Monday episode, a look into how Ruby constructs new objects, and how we can customize constructors for special scenarios.
httpv://youtube.com/watch?v=WN4wVtYU4Fo
[boilerplate bypath=”rubytapas-sample”]Avdi Grimm, Code Cleric
In today’s free Monday episode, a look into how Ruby constructs new objects, and how we can customize constructors for special scenarios.
httpv://youtube.com/watch?v=WN4wVtYU4Fo
[boilerplate bypath=”rubytapas-sample”]
what is very editor you used in the video? It seems very nice
Emacs
Emacs!
Avdi, you showed the passing of &block from the class’ new function to the instance’s initialize function. How is this typically used in initialize? yield(self), to perform further custom initialization of the object?
Yeah, that’s a common case.