title: How does passing a block work in ruby?
body: <pre><code>class Array
    def new_map!(&amp;block)
      self.replace( self.map(&amp;block) )
    end
  end
  </code></pre>
  
  <p>What does self here refer to? How does passing a block work here in simple layman's terms? A concrete example would help.</p>