From cdfc7251bde8347678d355e5fe65fc20e120bc23 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 21:45:19 +0900 Subject: updating docs for 1.0.10a release --- doc/Axlsx/Row.html | 187 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 107 insertions(+), 80 deletions(-) (limited to 'doc/Axlsx/Row.html') diff --git a/doc/Axlsx/Row.html b/doc/Axlsx/Row.html index cabe0e35..24933dab 100644 --- a/doc/Axlsx/Row.html +++ b/doc/Axlsx/Row.html @@ -97,13 +97,15 @@
Note: -
-

The recommended way to manage rows and cells is to use Worksheet#add_row

+

+The recommended way to manage rows and cells is to use Worksheet#add_row +

- -

A Row is a single row in a worksheet.

+

+A Row is a single row in a worksheet. +

@@ -142,8 +144,9 @@ -
-

The cells this row holds.

+

+The cells this row holds. +

@@ -168,8 +171,9 @@ -
-

The worksheet this row belongs to.

+

+The worksheet this row belongs to. +

@@ -204,9 +208,10 @@ -
-

Adds a singel sell to the row based on the data provided and updates the -worksheet's autofit data.

+

+Adds a singel sell to the row based on the data provided and updates the +worksheet’s autofit data. +

@@ -228,8 +233,9 @@ worksheet's autofit data.

-
-

The index of this row in the worksheet.

+

+The index of this row in the worksheet. +

@@ -253,8 +259,9 @@ worksheet's autofit data.

-
-

Creates a new row.

+

+Creates a new row. +

@@ -276,8 +283,9 @@ worksheet's autofit data.

-
-

sets the style for every cell in this row.

+

+sets the style for every cell in this row. +

@@ -320,8 +328,9 @@ worksheet's autofit data.

-
-

Serializes the row.

+

+Serializes the row. +

@@ -342,17 +351,19 @@ worksheet's autofit data.

- -

Creates a new row. New Cell objects are created based on the values, types +

+Creates a new row. New Cell objects are created based on the values, types and style options. A new cell is created for each item in the values array. -style and types options are applied as follows:

- -
If the types option is defined and is a symbol it is applied to all the cells created.
-If the types option is an array, cell types are applied by index for each cell
-If the types option is not set, the cell will automatically determine its type.
-If the style option is defined and is an Integer, it is applied to all cells created.
-If the style option is an array, style is applied by index for each cell.
-If the style option is not defined, the default style (0) is applied to each cell.
+style and types options are applied as follows: +

+
+  If the types option is defined and is a symbol it is applied to all the cells created.
+  If the types option is an array, cell types are applied by index for each cell
+  If the types option is not set, the cell will automatically determine its type.
+  If the style option is defined and is an Integer, it is applied to all cells created.
+  If the style option is an array, style is applied by index for each cell.
+  If the style option is not defined, the default style (0) is applied to each cell.
+
@@ -384,8 +395,9 @@ If the style option is not defined, the default style (0) is applied to each cel — -
-

a customizable set of options

+

+a customizable set of options +

@@ -458,12 +470,13 @@ If the style option is not defined, the default style (0) is applied to each cel
# File 'lib/axlsx/workbook/worksheet/row.rb', line 29
 
-def initialize(worksheet, values=[], options={})
-  self.worksheet = worksheet
-  @cells = SimpleTypedList.new Cell
-  @worksheet.rows << self
-  array_to_cells(values, options)
-end
+def initialize(worksheet, values=[], options={}) + self.worksheet = worksheet + @cells = SimpleTypedList.new Cell + @worksheet.rows << self + array_to_cells(values, options) +end + @@ -486,8 +499,9 @@ If the style option is not defined, the default style (0) is applied to each cel

- -

The cells this row holds

+

+The cells this row holds +

@@ -521,9 +535,10 @@ If the style option is not defined, the default style (0) is applied to each cel
# File 'lib/axlsx/workbook/worksheet/row.rb', line 13
 
-def cells
-  @cells
-end
+def cells + @cells +end + @@ -541,8 +556,9 @@ If the style option is not defined, the default style (0) is applied to each cel

- -

The worksheet this row belongs to

+

+The worksheet this row belongs to +

@@ -576,9 +592,10 @@ If the style option is not defined, the default style (0) is applied to each cel
# File 'lib/axlsx/workbook/worksheet/row.rb', line 9
 
-def worksheet
-  @worksheet
-end
+def worksheet + @worksheet +end + @@ -600,9 +617,10 @@ If the style option is not defined, the default style (0) is applied to each cel

- -

Adds a singel sell to the row based on the data provided and updates the -worksheet's autofit data.

+

+Adds a singel sell to the row based on the data provided and updates the +worksheet’s autofit data. +

@@ -638,11 +656,12 @@ worksheet's autofit data.

# File 'lib/axlsx/workbook/worksheet/row.rb', line 51
 
-def add_cell(value="", options={})
-  c = Cell.new(self, value, options)
-  update_auto_fit_data
-  c
-end
+def add_cell(value="", options={}) + c = Cell.new(self, value, options) + update_auto_fit_data + c +end + @@ -657,8 +676,9 @@ worksheet's autofit data.

- -

The index of this row in the worksheet

+

+The index of this row in the worksheet +

@@ -692,9 +712,10 @@ worksheet's autofit data.

# File 'lib/axlsx/workbook/worksheet/row.rb', line 38
 
-def index 
-  worksheet.rows.index(self)
-end
+def index + worksheet.rows.index(self) +end + @@ -709,8 +730,9 @@ worksheet's autofit data.

- -

sets the style for every cell in this row

+

+sets the style for every cell in this row +

@@ -734,12 +756,13 @@ worksheet's autofit data.

# File 'lib/axlsx/workbook/worksheet/row.rb', line 58
 
-def style=(style)
-  cells.each_with_index do | cell, index |
-    s = style.is_a?(Array) ? style[index] : style
-    cell.style = s
-  end
-end
+def style=(style) + cells.each_with_index do | cell, index | + s = style.is_a?(Array) ? style[index] : style + cell.style = s + end +end + @@ -765,9 +788,10 @@ worksheet's autofit data.

# File 'lib/axlsx/workbook/worksheet/row.rb', line 65
 
-def to_ary
-  @cells.to_ary
-end
+def to_ary + @cells.to_ary +end + @@ -782,8 +806,9 @@ worksheet's autofit data.

- -

Serializes the row

+

+Serializes the row +

@@ -802,8 +827,9 @@ worksheet's autofit data.

— -
-

The document builder instance this objects xml will be added to.

+

+The document builder instance this objects xml will be added to. +

@@ -837,9 +863,10 @@ worksheet's autofit data.

# File 'lib/axlsx/workbook/worksheet/row.rb', line 45
 
-def to_xml(xml)
-  xml.row(:r => index+1) { @cells.each { |cell| cell.to_xml(xml) } }
-end
+def to_xml(xml) + xml.row(:r => index+1) { @cells.each { |cell| cell.to_xml(xml) } } +end + @@ -850,9 +877,9 @@ worksheet's autofit data.

-- cgit v1.2.3