title: Convert array to nested hash in ruby
body: <p>I have following array</p>
  
  <pre><code>['a', 'b', 'c']
  </code></pre>
  
  <p>How to convert it to hash like this bellow:</p>
  
  <pre><code>{'a' =&gt; { position: index of array element a }, 'b' ...., 'c' ... }
  </code></pre>
  
  <p>Best regards
  Georgi.</p>