Mastering Ruby Closures: A Guide to Blocks, Procs, and Lambdas