Passing a block as keyword argument
<p>Is it possible (if yes how) to pass a block as a keyword argument in a ruby method?</p>

<p>Basically, I'd like to do</p>

<pre><code>pippo(even: {|n| n+1 }, odd: {|n| n-1})
</code></pre>

<p>Having the method defined as such</p>

<pre><code>def pippo(even: , odd:)
  even? ? even.yield(self) : odd.yield(self)
end
</code></pre>

<p>Thanks</p>