lib/rubypivot/pivot.rb
def build_data
      parse_data unless @rows_parsed
      res = {}
      @row_titles.each do |row_title|
        row = @rows_parsed.get_row(row_title)
        title = column_head(row_title)
        res[title] = row.to_a(column_titles)
      end
      res
    end
# return an pivot hash. data rows only
return an pivot hash. data rows only
return an pivot hash . data rows only
def build_data
      parse_data unless @rows_parsed
      res = {}
      @row_titles.each do |row_title|
        row = @rows_parsed.get_row(row_title)
        title = column_head(row_title)
        res[title] = row.to_a(column_titles)
      end
      res
    end
def build_data parse_data unless @rows_parsed res = { } @row_titles . each do | row_title | row = @rows_parsed . get_row ( row_title ) title = column_head ( row_title ) res [ title ] = row . to_a ( column_titles ) end res end
return an pivot hash.
return an pivot hash .