Blocks are a fundamental concept in Ruby. Many common Ruby methods use blocks. Blocks are also an integral part of many domain-specific languages (DSLs) in libraries like RSpec, Factory Bot, and Rails itself. In this post we’ll discuss what a block is. Then we’ll take a look at four different native Ruby methods that take […]