How to Control Flow in Ruby Blocks
03-May-2017 2916
I recently found myself needing to return early from a block passed into a method in Ruby. Although the way to do this is fairly simple and obvious in hindsight, it seemed to surprise some of my Ruby-enthusiast colleagues. I decided to write this post in the hopes that it’s interesting to others.
How to Control Flow in Ruby Blocks #ruby #rubydeveloper #rubyonrails #Control #Blocks https://rubyonrails.ba/link/how-to-control-flow-in-ruby-blocks