title: What does the "yield" keyword do in Ruby?
body: <p>I encountered the following Ruby code:</p>
  
  <pre><code>class MyClass
      attr_accessor :items
      ...
      def each
          @items.each{|item| yield item}
      end
      ...
  end
  </code></pre>
  
  <p>What does the <code>each</code> method do? In particular, I don't understand what <code>yield</code> does.</p>