Est ce que quelqu'un pourrait m'expliquer cette histoire de yield car dans le cours pour apprendre Ruby que je suis actuellement je n'ai pas compris :
Why do some methods accept a block and others don't? It's because methods that accept blocks have a way of transferring control from the calling method to the block and back again. We can build this into the methods we define by using the yield keyword.
Partager