title: Ruby - get hash of method parameters and their current value
body: <p>Is there a way in Ruby to get the current method's list of arguments and their current value (during method run)? As in:</p>
  
  <pre><code>def foo(a, b, c)
      arg_vals = __method__params__
      return arg_vals
  end
  
   x = foo(10,20,30) #returns {a:10, b:20, c:30}
  </code></pre>
  
  <p>(Background: I want this for my logging library, so that from any point I could call: )</p>
  
  <pre><code>my_logger(__method__, __method__params__)
  </code></pre>