title: Passing a class method as a block to map in ruby
body: <p>I'm having what's probably a silly problem but I can't for the life of me find anything about whether this can or can't be done.</p>
  
  <p>Basically I'm aware that calling <code>array.each do(&amp;method)</code> converts the method into a proc and calls it with each yielded value. The issue I'm having is trying to do the same with a class method.</p>
  
  <p>I've written a <code>Card</code> class and want to parse a string with something like this.</p>
  
  <pre><code>%w{4S 5D 9H 1C 3S}.map(&amp;Card.safe_parse)
  </code></pre>
  
  <p>I've tried </p>
  
  <pre><code>.map(Card.method(:safe_parse).to_proc) 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>.map(&amp;Card.method(:safe_parse)) 
  </code></pre>
  
  <p>but nothing is working. Obviously it works with <code>.map { |x| Card.safe_parse x }</code> but it feels like there's a cleverer way I'm not seeing and I'm trying to better understand ruby blocks.</p>
  
  <p>Thanks!</p>