title: How to convert a string into integer without using ruby 'to_i' method
body: <p>I want to convert given string into integer without using ruby <code>to_i</code> method.</p>
  
  <p>Basically, I want to know how to_i was implemented or what is the best way to do that.
  Eg : </p>
  
  <pre><code>a = '1234'
  
  result 
  a = 1234
  </code></pre>
  
  <p>Thanks in advance</p>