25 Apr '16, 12am

Blocks, Procs, and Enumerable

Blocks allow methods to take arbitrary snippets of code as arguments and run them. The pattern of passing in an anonymous function into a method is commonly used across multiple languages. JavaScript, for example, is notorious for its use of deeply nested anonymous callback functions.

Full article: https://robots.thoughtbot.com/blocks-procs-and-enumerable


Introduction to blocks in Ruby

rubyflow.com 01 May '16, 1am

× The Ruby and Rails community linklog Made a library? Written a blog post? Found a useful tutorial? Share it with the Rub...