class Xeroizer::Report::Row

Attributes

cells[RW]
header[RW]
parent[RW]
report[R]
rows[RW]
title[RW]
type[RW]

Public Class Methods

new(report) click to toggle source
# File lib/xeroizer/report/row/row.rb, line 22
def initialize(report)
  @rows = []
  @cells = []
  @report = report
end

Public Instance Methods

cell(column_name) click to toggle source
# File lib/xeroizer/report/row/row.rb, line 41
def cell(column_name)
  index = header.column_index(column_name)
  cells[index] if index >= 0
end
child?() click to toggle source
# File lib/xeroizer/report/row/row.rb, line 33
def child?
  !parent.nil?
end
header?() click to toggle source
# File lib/xeroizer/report/row/row.rb, line 28
def header?;  @type == 'Header';      end
parent?() click to toggle source
# File lib/xeroizer/report/row/row.rb, line 37
def parent?
  rows.size > 0
end
row?() click to toggle source
# File lib/xeroizer/report/row/row.rb, line 31
def row?;     @type == 'Row';         end
section?() click to toggle source
# File lib/xeroizer/report/row/row.rb, line 30
def section?; @type == 'Section';     end
summary?() click to toggle source
# File lib/xeroizer/report/row/row.rb, line 29
def summary?; @type == 'SummaryRow';  end