An introduction to code blocks

What is a code block anyway? Well, a code block is a chunk of code… that’s all there is to say about it. I know, this part is not really interesting. What IS interesting though, is that you can pass a block to a ruby function and then have this function call the block whenever it wants.

Continue reading →