Class: POI::Row

Inherits:
Facade
  • Object
show all
Defined in:
lib/poi/workbook/row.rb

Instance Method Summary collapse

Constructor Details

#initialize(row, worksheet) ⇒ Row

Returns a new instance of Row.



26
27
28
29
# File 'lib/poi/workbook/row.rb', line 26

def initialize(row, worksheet)
  @row       = row
  @worksheet = worksheet
end

Instance Method Details

#[](index) ⇒ Object



31
32
33
34
# File 'lib/poi/workbook/row.rb', line 31

def [](index)
  return nil if poi_row.nil?
  cells[index]
end

#cellsObject



36
37
38
# File 'lib/poi/workbook/row.rb', line 36

def cells
  @cells ||= Cells.new(self)
end

#indexObject



40
41
42
43
# File 'lib/poi/workbook/row.rb', line 40

def index
  return nil if poi_row.nil?
  poi_row.row_num
end

#poi_rowObject

def height_in_points= num

set_height_in_points num.to_f

end



49
50
51
# File 'lib/poi/workbook/row.rb', line 49

def poi_row
  @row
end

#worksheetObject



53
54
55
# File 'lib/poi/workbook/row.rb', line 53

def worksheet
  @worksheet
end