title: How to get the file extension from a url?
body: <p>New to ruby, how would I get the file extension from a url like:</p>
  
  <pre><code>http://www.example.com/asdf123.gif
  </code></pre>
  
  <p>Also, how would I format this string, in c# I would do:</p>
  
  <pre><code>string.format("http://www.example.com/{0}.{1}", filename, extension);
  </code></pre>