diff options
| author | Randy Morgan <[email protected]> | 2011-11-26 13:20:57 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2011-11-26 13:20:57 +0900 |
| commit | 11303a4d6664d9a7ff7bc408035d2ab70378a375 (patch) | |
| tree | 51c675ae3ab8cd6c1afd7087145261b1eb2ec54c /doc/Axlsx/Row.html | |
| parent | 044afe5a35db42cefce4f18a0fecc3da90cab1b5 (diff) | |
| download | caxlsx-11303a4d6664d9a7ff7bc408035d2ab70378a375.tar.gz caxlsx-11303a4d6664d9a7ff7bc408035d2ab70378a375.zip | |
adding in support for ruby 1.9.3
release version 1.0.9
Diffstat (limited to 'doc/Axlsx/Row.html')
| -rw-r--r-- | doc/Axlsx/Row.html | 293 |
1 files changed, 132 insertions, 161 deletions
diff --git a/doc/Axlsx/Row.html b/doc/Axlsx/Row.html index 92ff0d15..84687f5e 100644 --- a/doc/Axlsx/Row.html +++ b/doc/Axlsx/Row.html @@ -6,7 +6,7 @@ <title> Class: Axlsx::Row - — Documentation by YARD 0.7.3 + — AXLSX </title> @@ -97,15 +97,13 @@ <div class="note notetag"> <strong>Note:</strong> - <div class='inline'><p> -The recommended way to manage rows and cells is to use Worksheet#add_row -</p> + <div class='inline'> +<p>The recommended way to manage rows and cells is to use Worksheet#add_row</p> </div> </div> -<p> -A Row is a single row in a worksheet. -</p> + +<p>A Row is a single row in a worksheet.</p> </div> @@ -144,9 +142,8 @@ A Row is a single row in a worksheet. - <span class="summary_desc"><div class='inline'><p> -The cells this row holds. -</p> + <span class="summary_desc"><div class='inline'> +<p>The cells this row holds.</p> </div></span> </li> @@ -155,14 +152,14 @@ The cells this row holds. <li class="public "> <span class="summary_signature"> - <a href="#index-instance_method" title="#index (instance method)">- (Integer) <strong>index</strong> </a> + <a href="#worksheet-instance_method" title="#worksheet (instance method)">- (Worksheet) <strong>worksheet</strong> </a> </span> - <span class="note title readonly">readonly</span> + @@ -171,58 +168,54 @@ The cells this row holds. - <span class="summary_desc"><div class='inline'><p> -The index of this row in the worksheet. -</p> + <span class="summary_desc"><div class='inline'> +<p>The worksheet this row belongs to.</p> </div></span> </li> - <li class="public "> + </ul> + + + + + + <h2> + Instance Method Summary + <small>(<a href="#" class="summary_toggle">collapse</a>)</small> + </h2> + + <ul class="summary"> + + <li class="public "> <span class="summary_signature"> - <a href="#worksheet-instance_method" title="#worksheet (instance method)">- (Worksheet) <strong>worksheet</strong> </a> + <a href="#add_cell-instance_method" title="#add_cell (instance method)">- (Cell) <strong>add_cell</strong>(value = "", options = {}) </a> </span> - - - - <span class="summary_desc"><div class='inline'><p> -The worksheet this row belongs to. -</p> + <span class="summary_desc"><div class='inline'> +<p>Adds a singel sell to the row based on the data provided and updates the +worksheet's autofit data.</p> </div></span> </li> - - </ul> - - - - - - <h2> - Instance Method Summary - <small>(<a href="#" class="summary_toggle">collapse</a>)</small> - </h2> - - <ul class="summary"> <li class="public "> <span class="summary_signature"> - <a href="#add_cell-instance_method" title="#add_cell (instance method)">- (Cell) <strong>add_cell</strong>(value = "", options = {}) </a> + <a href="#index-instance_method" title="#index (instance method)">- (Integer) <strong>index</strong> </a> @@ -235,10 +228,8 @@ The worksheet this row belongs to. - <span class="summary_desc"><div class='inline'><p> -Adds a singel sell to the row based on the data provided and updates the -worksheet’s autofit data. -</p> + <span class="summary_desc"><div class='inline'> +<p>The index of this row in the worksheet.</p> </div></span> </li> @@ -262,9 +253,8 @@ worksheet’s autofit data. - <span class="summary_desc"><div class='inline'><p> -Creates a new row. -</p> + <span class="summary_desc"><div class='inline'> +<p>Creates a new row.</p> </div></span> </li> @@ -286,9 +276,8 @@ Creates a new row. - <span class="summary_desc"><div class='inline'><p> -Serializes the row. -</p> + <span class="summary_desc"><div class='inline'> +<p>Serializes the row.</p> </div></span> </li> @@ -309,19 +298,17 @@ Serializes the row. </p><div class="docstring"> <div class="discussion"> - <p> -Creates a new row. New Cell objects are created based on the values, types + +<p>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: -</p> -<pre class="code"> - <span class='If constant id'>If</span> <span class='the identifier id'>the</span> <span class='types identifier id'>types</span> <span class='option identifier id'>option</span> <span class='is identifier id'>is</span> <span class='defined identifier id'>defined</span> <span class='and and kw'>and</span> <span class='is identifier id'>is</span> <span class='a identifier id'>a</span> <span class='symbol identifier id'>symbol</span> <span class='it identifier id'>it</span> <span class='is identifier id'>is</span> <span class='applied identifier id'>applied</span> <span class='to identifier id'>to</span> <span class='all identifier id'>all</span> <span class='the identifier id'>the</span> <span class='cells identifier id'>cells</span> <span class='created identifier id'>created</span><span class='dot token'>.</span> - <span class='If constant id'>If</span> <span class='the identifier id'>the</span> <span class='types identifier id'>types</span> <span class='option identifier id'>option</span> <span class='is identifier id'>is</span> <span class='an identifier id'>an</span> <span class='array identifier id'>array</span><span class='comma token'>,</span> <span class='cell identifier id'>cell</span> <span class='types identifier id'>types</span> <span class='are identifier id'>are</span> <span class='applied identifier id'>applied</span> <span class='by identifier id'>by</span> <span class='index identifier id'>index</span> <span class='for for kw'>for</span> <span class='each identifier id'>each</span> <span class='cell identifier id'>cell</span> - <span class='If constant id'>If</span> <span class='the identifier id'>the</span> <span class='types identifier id'>types</span> <span class='option identifier id'>option</span> <span class='is identifier id'>is</span> <span class='not not kw'>not</span> <span class='set identifier id'>set</span><span class='comma token'>,</span> <span class='the identifier id'>the</span> <span class='cell identifier id'>cell</span> <span class='will identifier id'>will</span> <span class='automatically identifier id'>automatically</span> <span class='determine identifier id'>determine</span> <span class='its identifier id'>its</span> <span class='type identifier id'>type</span><span class='dot token'>.</span> - <span class='If constant id'>If</span> <span class='the identifier id'>the</span> <span class='style identifier id'>style</span> <span class='option identifier id'>option</span> <span class='is identifier id'>is</span> <span class='defined identifier id'>defined</span> <span class='and and kw'>and</span> <span class='is identifier id'>is</span> <span class='an identifier id'>an</span> <span class='Integer constant id'>Integer</span><span class='comma token'>,</span> <span class='it identifier id'>it</span> <span class='is identifier id'>is</span> <span class='applied identifier id'>applied</span> <span class='to identifier id'>to</span> <span class='all identifier id'>all</span> <span class='cells identifier id'>cells</span> <span class='created identifier id'>created</span><span class='dot token'>.</span> - <span class='If constant id'>If</span> <span class='the identifier id'>the</span> <span class='style identifier id'>style</span> <span class='option identifier id'>option</span> <span class='is identifier id'>is</span> <span class='an identifier id'>an</span> <span class='array identifier id'>array</span><span class='comma token'>,</span> <span class='style identifier id'>style</span> <span class='is identifier id'>is</span> <span class='applied identifier id'>applied</span> <span class='by identifier id'>by</span> <span class='index identifier id'>index</span> <span class='for for kw'>for</span> <span class='each identifier id'>each</span> <span class='cell identifier id'>cell</span><span class='dot token'>.</span> - <span class='If constant id'>If</span> <span class='the identifier id'>the</span> <span class='style identifier id'>style</span> <span class='option identifier id'>option</span> <span class='is identifier id'>is</span> <span class='not not kw'>not</span> <span class='defined identifier id'>defined</span><span class='comma token'>,</span> <span class='the identifier id'>the</span> <span class='default identifier id'>default</span> <span class='style identifier id'>style</span> <span class='lparen token'>(</span><span class='integer val'>0</span><span class='rparen token'>)</span> <span class='is identifier id'>is</span> <span class='applied identifier id'>applied</span> <span class='to identifier id'>to</span> <span class='each identifier id'>each</span> <span class='cell identifier id'>cell</span><span class='dot token'>.</span> -</pre> +style and types options are applied as follows:</p> + +<pre class="code">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.</pre> </div> @@ -353,9 +340,8 @@ style and types options are applied as follows: — - <div class='inline'><p> -a customizable set of options -</p> + <div class='inline'> +<p>a customizable set of options</p> </div> </li> @@ -418,23 +404,22 @@ a customizable set of options <pre class="lines"> +29 +30 +31 +32 33 -34 -35 -36 -37 -38</pre> +34</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 33</span> - -<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='worksheet identifier id'>worksheet</span><span class='comma token'>,</span> <span class='values identifier id'>values</span><span class='assign token'>=</span><span class='lbrack token'>[</span><span class='rbrack token'>]</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> - <span class='self self kw'>self</span><span class='dot token'>.</span><span class='worksheet identifier id'>worksheet</span> <span class='assign token'>=</span> <span class='worksheet identifier id'>worksheet</span> - <span class='@cells ivar id'>@cells</span> <span class='assign token'>=</span> <span class='SimpleTypedList constant id'>SimpleTypedList</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='Cell constant id'>Cell</span> - <span class='@worksheet ivar id'>@worksheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span> <span class='lshft op'><<</span> <span class='self self kw'>self</span> - <span class='array_to_cells identifier id'>array_to_cells</span><span class='lparen token'>(</span><span class='values identifier id'>values</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span> -<span class='end end kw'>end</span> -</pre> + <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 29</span> + +<span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id worksheet'>worksheet</span><span class='comma'>,</span> <span class='id values'>values</span><span class='op'>=</span><span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> + <span class='kw'>self</span><span class='period'>.</span><span class='id worksheet'>worksheet</span> <span class='op'>=</span> <span class='id worksheet'>worksheet</span> + <span class='ivar'>@cells</span> <span class='op'>=</span> <span class='const'>SimpleTypedList</span><span class='period'>.</span><span class='id new'>new</span> <span class='const'>Cell</span> + <span class='ivar'>@worksheet</span><span class='period'>.</span><span class='id rows'>rows</span> <span class='op'><<</span> <span class='kw'>self</span> + <span class='id array_to_cells'>array_to_cells</span><span class='lparen'>(</span><span class='id values'>values</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span> +<span class='kw'>end</span></pre> </td> </tr> </table> @@ -457,9 +442,8 @@ a customizable set of options </p><div class="docstring"> <div class="discussion"> - <p> -The cells this row holds -</p> + +<p>The cells this row holds</p> </div> @@ -493,30 +477,28 @@ The cells this row holds <td> <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 13</span> -<span class='def def kw'>def</span> <span class='cells identifier id'>cells</span> - <span class='@cells ivar id'>@cells</span> -<span class='end end kw'>end</span> -</pre> +<span class='kw'>def</span> <span class='id cells'>cells</span> + <span class='ivar'>@cells</span> +<span class='kw'>end</span></pre> </td> </tr> </table> </div> - <span id=""></span> - <span id="index-instance_method"></span> + <span id="worksheet=-instance_method"></span> + <span id="worksheet-instance_method"></span> <div class="method_details "> - <p class="signature " id="index-instance_method"> + <p class="signature " id="worksheet-instance_method"> - - (<tt>Integer</tt>) <strong>index</strong> <span class="extras">(readonly)</span> + - (<tt><span class='object_link'><a href="Worksheet.html" title="Axlsx::Worksheet (class)">Worksheet</a></span></tt>) <strong>worksheet</strong> </p><div class="docstring"> <div class="discussion"> - <p> -The index of this row in the worksheet -</p> + +<p>The worksheet this row belongs to</p> </div> @@ -529,7 +511,7 @@ The index of this row in the worksheet <li> - <span class='type'>(<tt>Integer</tt>)</span> + <span class='type'>(<tt><span class='object_link'><a href="Worksheet.html" title="Axlsx::Worksheet (class)">Worksheet</a></span></tt>)</span> @@ -543,37 +525,40 @@ The index of this row in the worksheet <pre class="lines"> -17 -18 -19</pre> +9 +10 +11</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 17</span> + <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 9</span> -<span class='def def kw'>def</span> <span class='index identifier id'>index</span> - <span class='worksheet identifier id'>worksheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='index identifier id'>index</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='rparen token'>)</span> -<span class='end end kw'>end</span> -</pre> +<span class='kw'>def</span> <span class='id worksheet'>worksheet</span> + <span class='ivar'>@worksheet</span> +<span class='kw'>end</span></pre> </td> </tr> </table> </div> - - <span id="worksheet=-instance_method"></span> - <span id="worksheet-instance_method"></span> - <div class="method_details "> - <p class="signature " id="worksheet-instance_method"> + </div> + + + <div id="instance_method_details" class="method_details_list"> + <h2>Instance Method Details</h2> + + + <div class="method_details first"> + <p class="signature first" id="add_cell-instance_method"> - - (<tt><span class='object_link'><a href="Worksheet.html" title="Axlsx::Worksheet (class)">Worksheet</a></span></tt>) <strong>worksheet</strong> + - (<tt><span class='object_link'><a href="Cell.html" title="Axlsx::Cell (class)">Cell</a></span></tt>) <strong>add_cell</strong>(value = "", options = {}) </p><div class="docstring"> <div class="discussion"> - <p> -The worksheet this row belongs to -</p> + +<p>Adds a singel sell to the row based on the data provided and updates the +worksheet's autofit data.</p> </div> @@ -586,7 +571,7 @@ The worksheet this row belongs to <li> - <span class='type'>(<tt><span class='object_link'><a href="Worksheet.html" title="Axlsx::Worksheet (class)">Worksheet</a></span></tt>)</span> + <span class='type'>(<tt><span class='object_link'><a href="Cell.html" title="Axlsx::Cell (class)">Cell</a></span></tt>)</span> @@ -600,42 +585,36 @@ The worksheet this row belongs to <pre class="lines"> -9 -10 -11</pre> +51 +52 +53 +54 +55</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 9</span> + <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 51</span> -<span class='def def kw'>def</span> <span class='worksheet identifier id'>worksheet</span> - <span class='@worksheet ivar id'>@worksheet</span> -<span class='end end kw'>end</span> -</pre> +<span class='kw'>def</span> <span class='id add_cell'>add_cell</span><span class='lparen'>(</span><span class='id value'>value</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> + <span class='id c'>c</span> <span class='op'>=</span> <span class='const'>Cell</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='id value'>value</span><span class='comma'>,</span> <span class='id options'>options</span><span class='rparen'>)</span> + <span class='id update_auto_fit_data'>update_auto_fit_data</span> + <span class='id c'>c</span> +<span class='kw'>end</span></pre> </td> </tr> </table> </div> - </div> - - - <div id="instance_method_details" class="method_details_list"> - <h2>Instance Method Details</h2> - - - <div class="method_details first"> - <p class="signature first" id="add_cell-instance_method"> + <div class="method_details "> + <p class="signature " id="index-instance_method"> - - (<tt><span class='object_link'><a href="Cell.html" title="Axlsx::Cell (class)">Cell</a></span></tt>) <strong>add_cell</strong>(value = "", options = {}) + - (<tt>Integer</tt>) <strong>index</strong> </p><div class="docstring"> <div class="discussion"> - <p> -Adds a singel sell to the row based on the data provided and updates the -worksheet’s autofit data. -</p> + +<p>The index of this row in the worksheet</p> </div> @@ -648,7 +627,7 @@ worksheet’s autofit data. <li> - <span class='type'>(<tt><span class='object_link'><a href="Cell.html" title="Axlsx::Cell (class)">Cell</a></span></tt>)</span> + <span class='type'>(<tt>Integer</tt>)</span> @@ -662,21 +641,16 @@ worksheet’s autofit data. <pre class="lines"> -53 -54 -55 -56 -57</pre> +38 +39 +40</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 53</span> - -<span class='def def kw'>def</span> <span class='add_cell identifier id'>add_cell</span><span class='lparen token'>(</span><span class='value identifier id'>value</span><span class='assign token'>=</span><span class='string val'>""</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='assign token'>=</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> - <span class='c identifier id'>c</span> <span class='assign token'>=</span> <span class='Cell constant id'>Cell</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='comma token'>,</span> <span class='value identifier id'>value</span><span class='comma token'>,</span> <span class='options identifier id'>options</span><span class='rparen token'>)</span> - <span class='update_auto_fit_data identifier id'>update_auto_fit_data</span> - <span class='c identifier id'>c</span> -<span class='end end kw'>end</span> -</pre> + <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 38</span> + +<span class='kw'>def</span> <span class='id index'>index</span> + <span class='id worksheet'>worksheet</span><span class='period'>.</span><span class='id rows'>rows</span><span class='period'>.</span><span class='id index'>index</span><span class='lparen'>(</span><span class='kw'>self</span><span class='rparen'>)</span> +<span class='kw'>end</span></pre> </td> </tr> </table> @@ -691,9 +665,8 @@ worksheet’s autofit data. </p><div class="docstring"> <div class="discussion"> - <p> -Serializes the row -</p> + +<p>Serializes the row</p> </div> @@ -712,9 +685,8 @@ Serializes the row — - <div class='inline'><p> -The document builder instance this objects xml will be added to. -</p> + <div class='inline'> +<p>The document builder instance this objects xml will be added to.</p> </div> </li> @@ -741,17 +713,16 @@ The document builder instance this objects xml will be added to. <pre class="lines"> -47 -48 -49</pre> +45 +46 +47</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 47</span> + <pre class="code"><span class="info file"># File 'lib/axlsx/workbook/worksheet/row.rb', line 45</span> -<span class='def def kw'>def</span> <span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span> - <span class='xml identifier id'>xml</span><span class='dot token'>.</span><span class='row identifier id'>row</span><span class='lparen token'>(</span><span class='symbol val'>:r</span> <span class='assign token'>=</span><span class='gt op'>></span> <span class='index identifier id'>index</span><span class='plus op'>+</span><span class='integer val'>1</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span> <span class='@cells ivar id'>@cells</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='lbrace token'>{</span> <span class='bitor op'>|</span><span class='cell identifier id'>cell</span><span class='bitor op'>|</span> <span class='cell identifier id'>cell</span><span class='dot token'>.</span><span class='to_xml identifier id'>to_xml</span><span class='lparen token'>(</span><span class='xml identifier id'>xml</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span> <span class='rbrace token'>}</span> -<span class='end end kw'>end</span> -</pre> +<span class='kw'>def</span> <span class='id to_xml'>to_xml</span><span class='lparen'>(</span><span class='id xml'>xml</span><span class='rparen'>)</span> + <span class='id xml'>xml</span><span class='period'>.</span><span class='id row'>row</span><span class='lparen'>(</span><span class='symbol'>:r</span> <span class='op'>=></span> <span class='id index'>index</span><span class='op'>+</span><span class='int'>1</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='ivar'>@cells</span><span class='period'>.</span><span class='id each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id cell'>cell</span><span class='op'>|</span> <span class='id cell'>cell</span><span class='period'>.</span><span class='id to_xml'>to_xml</span><span class='lparen'>(</span><span class='id xml'>xml</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span> +<span class='kw'>end</span></pre> </td> </tr> </table> @@ -762,9 +733,9 @@ The document builder instance this objects xml will be added to. </div> <div id="footer"> - Generated on Wed Nov 23 22:20:49 2011 by + Generated on Sat Nov 26 13:16:39 2011 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.7.3 (ruby-1.8.7). + 0.7.3 (ruby-1.9.3). </div> </body> |
