Class: Cartos::Spreadsheet::Summary

Inherits:
Sheet
  • Object
show all
Defined in:
lib/cartos/spreadsheet/sheets/summary.rb

Constant Summary collapse

TOTALS =
"A"
CATEGORIES =
"A"

Instance Method Summary collapse

Methods inherited from Sheet

#push_row, #save, #set_row

Constructor Details

#initialize(sheet) ⇒ Summary

Returns a new instance of Summary.



7
8
9
10
11
12
# File 'lib/cartos/spreadsheet/sheets/summary.rb', line 7

def initialize(sheet)
  super sheet
  @last_col_used = 1
  @month_cols = {}
  @category_row = {}
end

Instance Method Details

#push_categories(categories) ⇒ Object



18
19
20
21
# File 'lib/cartos/spreadsheet/sheets/summary.rb', line 18

def push_categories(categories)
  row, _ = push_row CATEGORIES, "Categories"
  push_summnary row, CATEGORIES, categories
end

#push_totals(totals) ⇒ Object



14
15
16
17
# File 'lib/cartos/spreadsheet/sheets/summary.rb', line 14

def push_totals(totals)
  row, _ = push_row TOTALS, "Totals"
  push_summnary row, TOTALS, totals
end