module StatsHash

Public Instance Methods

create_stats_hash(data) click to toggle source
# File lib/helpers/stats_hash.rb, line 2
def create_stats_hash(data)
  stats = []
  data['rowSet'].each do |row|
    row_hash = {}
    data['headers'].each_with_index do |header, index|
      row_hash[header] = row[index]
    end
    stats << row_hash
  end
  stats
end