class ReadXls::Evaluator::Row

Attributes

columns[RW]
first_col[RW]
last_col[RW]
row_number[RW]

Public Class Methods

new(row_number, first_col, last_col) click to toggle source
# File lib/read_xls/evaluator/row.rb, line 6
def initialize(row_number, first_col, last_col)
  self.row_number = row_number
  self.first_col  = first_col
  self.last_col   = last_col
  self.columns    = []
end

Public Instance Methods

add_column(column_index, value) click to toggle source
# File lib/read_xls/evaluator/row.rb, line 13
def add_column(column_index, value)
  columns[column_index] = value
end
evaluate() click to toggle source
# File lib/read_xls/evaluator/row.rb, line 17
def evaluate
  columns.each_with_index.each do |_, column_index|
    columns[column_index] ||= ::ReadXls::Evaluator::Blank.new
  end

  columns.map(&:evaluate)
end