From 058faf2581970fa18c314ad07f5658adeca32c69 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Sun, 27 Nov 2011 22:08:55 +0900 Subject: update to README --- doc/Axlsx/Row.html | 201 +++++++++++++++++++++++------------------------------ 1 file changed, 86 insertions(+), 115 deletions(-) (limited to 'doc/Axlsx/Row.html') diff --git a/doc/Axlsx/Row.html b/doc/Axlsx/Row.html index e8623faa..605336b7 100644 --- a/doc/Axlsx/Row.html +++ b/doc/Axlsx/Row.html @@ -97,15 +97,13 @@
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.

@@ -144,9 +142,8 @@ A Row is a single row in a worksheet. -

-The cells this row holds. -

+
+

The cells this row holds.

@@ -171,9 +168,8 @@ The cells this row holds. -

-The worksheet this row belongs to. -

+
+

The worksheet this row belongs to.

@@ -208,10 +204,9 @@ The worksheet this row belongs to. -

-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.

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

-The index of this row in the worksheet. -

+
+

The index of this row in the worksheet.

@@ -259,9 +253,8 @@ The index of this row in the worksheet. -

-Creates a new row. -

+
+

Creates a new row.

@@ -283,9 +276,8 @@ Creates a new row. -

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

+
+

sets the style for every cell in this row.

@@ -307,10 +299,9 @@ sets the style for every cell in this row. -

-returns the cells in this row as an array This lets us transpose the rows -into columns. -

+
+

returns the cells in this row as an array This lets us transpose the rows +into columns.

@@ -332,9 +323,8 @@ into columns. -

-Serializes the row. -

+
+

Serializes the row.

@@ -355,19 +345,17 @@ Serializes the row.

-

-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.
@@ -399,9 +387,8 @@ style and types options are applied as follows: — -

-a customizable set of options -

+
+

a customizable set of options

@@ -474,13 +461,12 @@ a customizable set of options
# 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 @@ -503,9 +489,8 @@ a customizable set of options

-

-The cells this row holds -

+ +

The cells this row holds

@@ -539,10 +524,9 @@ The cells this row holds
# File 'lib/axlsx/workbook/worksheet/row.rb', line 13
 
-def cells
-  @cells
-end
-
+def cells + @cells +end @@ -560,9 +544,8 @@ The cells this row holds

-

-The worksheet this row belongs to -

+ +

The worksheet this row belongs to

@@ -596,10 +579,9 @@ The worksheet this row belongs to
# File 'lib/axlsx/workbook/worksheet/row.rb', line 9
 
-def worksheet
-  @worksheet
-end
-
+def worksheet + @worksheet +end @@ -621,10 +603,9 @@ The worksheet this row belongs to

-

-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.

@@ -660,12 +641,11 @@ 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 @@ -680,9 +660,8 @@ worksheet’s autofit data.

-

-The index of this row in the worksheet -

+ +

The index of this row in the worksheet

@@ -716,10 +695,9 @@ The index of this row in the worksheet
# File 'lib/axlsx/workbook/worksheet/row.rb', line 38
 
-def index 
-  worksheet.rows.index(self)
-end
-
+def index + worksheet.rows.index(self) +end @@ -734,9 +712,8 @@ The index of this row in the worksheet

-

-sets the style for every cell in this row -

+ +

sets the style for every cell in this row

@@ -760,13 +737,12 @@ sets the style for every cell in this row
# 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 @@ -781,10 +757,9 @@ sets the style for every cell in this row

-

-returns the cells in this row as an array This lets us transpose the rows -into columns -

+ +

returns the cells in this row as an array This lets us transpose the rows +into columns

@@ -818,10 +793,9 @@ into columns
# File 'lib/axlsx/workbook/worksheet/row.rb', line 68
 
-def to_ary
-  @cells.to_ary
-end
-
+def to_ary + @cells.to_ary +end @@ -836,9 +810,8 @@ into columns

-

-Serializes the row -

+ +

Serializes the row

@@ -857,9 +830,8 @@ Serializes the row — -

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

+
+

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

@@ -893,10 +865,9 @@ The document builder instance this objects xml will be added to.
# 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 @@ -907,9 +878,9 @@ The document builder instance this objects xml will be added to.
-- cgit v1.2.3