RubyFlow The Ruby and Rails community linklog

Implementing yield-or-enumerate semantics

Ruby’s core collection classes have a number of methods which return an Enumerator if they are called without a block. A while back I made a quick video showing how to replicate this behavior in your own methods. It’s now free to watch.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in