title: What are those pipe symbols for in Ruby?
body: <p>What are the pipe symbols for in Ruby?</p>
  
  <p>I'm learning Ruby and RoR, coming from a PHP and Java background, but I keep coming across code like this:</p>
  
  <pre><code>def new 
    @post = Post.new
  
    respond_to do |format|
      format.html # new.html.erb
      format.xml { render :xml =&gt; @post }
    end
  end
  </code></pre>
  
  <p>What is the <code>|format|</code> part doing? What's the equivalent syntax of these pipe symbols in PHP/Java?</p>