Translates given Binary code to Base Ten using Ruby