title: Ruby append string to each element in an array
body: <p>I am working on analytics ruby api client. When making a call i am sending the params as</p>
  
  <pre><code>dimensions = ["ga:hostName", "pagePath"]
  metrics = ["pageValue", "ga:pageviews"]
  .call_analytics(dimensions, metrics)
  </code></pre>
  
  <p>Even if the user does not enter "ga:" when passing params, the code should append "ga:" in the params. </p>
  
  <p>I have done it this way. </p>
  
  <pre><code>dimensions = dimensions.map{|a| ("ga:" + a.split(":").last).split}.flatten
  metrics = metrics.map{|a| ("ga:" + a.split(":").last).split}.flatten
  </code></pre>
  
  <p>Is there a better way to do it?</p>