Passing multiple blocks to a Ruby method

John Bachir's Code Blog
November 24, 2013

Something I've wanted to toy around with for a while -- here's a little pattern for passing multiple blocks to a Ruby method. This is something I find myself wishing for now and again, although at the moment I can't think of what one of those use cases were.

def generate_continue_object(*args)
 args.each{|a| puts a.inspect . . .

Read More

   Subscribe by email and never miss a post.