<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
  Class: RRTF::TableCellNode
  
    &mdash; Documentation by YARD 0.9.9
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  pathId = "RRTF::TableCellNode";
  relpath = '../';
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div class="nav_wrap">
      <iframe id="nav" src="../class_list.html?1"></iframe>
      <div id="resizer"></div>
    </div>

    <div id="main" tabindex="-1">
      <div id="header">
        <div id="menu">
  
    <a href="../_index.html">Index (T)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../RRTF.html" title="RRTF (module)">RRTF</a></span></span>
     &raquo; 
    <span class="title">TableCellNode</span>
  
</div>

        <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">

        <svg width="24" height="24">
          <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
          <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
        </svg>
    </a>
  
</div>
        <div class="clear"></div>
      </div>

      <div id="content"><h1>Class: RRTF::TableCellNode
  
  
  
</h1>
<div class="box_info">
  
  <dl>
    <dt>Inherits:</dt>
    <dd>
      <span class="inheritName"><span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next"><span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></li>
          
            <li class="next"><span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></li>
          
            <li class="next"><span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></li>
          
            <li class="next">RRTF::TableCellNode</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
    </dd>
  </dl>
  

  
  
  
  
  

  

  
  <dl>
    <dt>Defined in:</dt>
    <dd>lib/rrtf/node/table_cell_node.rb</dd>
  </dl>
  
</div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    
<p>This class represents a cell within an RTF table. The TableCellNode is a
specialised command node that is forbidden from creating tables or having
its parent changed.</p>


  </div>
</div>
<div class="tags">
  

</div>
  <h2>Constant Summary</h2>
  <dl class="constants">
    
      <dt id="DEFAULT_WIDTH-constant" class="">DEFAULT_WIDTH =
        <div class="docstring">
  <div class="discussion">
    
<p>A definition for the default width for the cell.</p>


  </div>
</div>
<div class="tags">
  

</div>
      </dt>
      <dd><pre class="code"><span class='int'>300</span></pre></dd>
    
      <dt id="TOP-constant" class="">TOP =
        <div class="docstring">
  <div class="discussion">
    
<p>Top border</p>


  </div>
</div>
<div class="tags">
  

</div>
      </dt>
      <dd><pre class="code"><span class='int'>0</span></pre></dd>
    
      <dt id="RIGHT-constant" class="">RIGHT =
        <div class="docstring">
  <div class="discussion">
    
<p>Right border</p>


  </div>
</div>
<div class="tags">
  

</div>
      </dt>
      <dd><pre class="code"><span class='int'>1</span></pre></dd>
    
      <dt id="BOTTOM-constant" class="">BOTTOM =
        <div class="docstring">
  <div class="discussion">
    
<p>Bottom border</p>


  </div>
</div>
<div class="tags">
  

</div>
      </dt>
      <dd><pre class="code"><span class='int'>2</span></pre></dd>
    
      <dt id="LEFT-constant" class="">LEFT =
        <div class="docstring">
  <div class="discussion">
    
<p>Left border</p>


  </div>
</div>
<div class="tags">
  

</div>
      </dt>
      <dd><pre class="code"><span class='int'>3</span></pre></dd>
    
  </dl>




  <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#shading_colour-instance_method" title="#shading_colour (instance method)">#<strong>shading_colour</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Attribute accessor.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#style-instance_method" title="#style (instance method)">#<strong>style</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Attribute accessor.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#width-instance_method" title="#width (instance method)">#<strong>width</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>Width of cell.</p>
</div></span>
  
</li>

    
  </ul>



  
  
  <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="CommandNode.html#prefix-instance_method" title="RRTF::CommandNode#prefix (method)">#prefix</a></span>, <span class='object_link'><a href="CommandNode.html#split-instance_method" title="RRTF::CommandNode#split (method)">#split</a></span>, <span class='object_link'><a href="CommandNode.html#suffix-instance_method" title="RRTF::CommandNode#suffix (method)">#suffix</a></span>, <span class='object_link'><a href="CommandNode.html#wrap-instance_method" title="RRTF::CommandNode#wrap (method)">#wrap</a></span></p>

  
  
  <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="ContainerNode.html#children-instance_method" title="RRTF::ContainerNode#children (method)">#children</a></span></p>

  
  
  <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="Node.html#parent-instance_method" title="RRTF::Node#parent (method)">#parent</a></span></p>


  
    <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="#border_width=-instance_method" title="#border_width= (instance method)">#<strong>border_width=</strong>(width)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method assigns a width, in twips, for the borders on all sides of the
cell.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#border_widths-instance_method" title="#border_widths (instance method)">#<strong>border_widths</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method retrieves an array with the cell border width settings.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#bottom_border_width-instance_method" title="#bottom_border_width (instance method)">#<strong>bottom_border_width</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method fetches the width for bottom border of a cell.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#bottom_border_width=-instance_method" title="#bottom_border_width= (instance method)">#<strong>bottom_border_width=</strong>(width)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method assigns a border width to the bottom side of a table cell.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(row, width = DEFAULT_WIDTH, style = nil, top = nil, right = nil, bottom = nil, left = nil)  &#x21d2; TableCellNode </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This is the constructor for the TableCellNode class.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#left_border_width-instance_method" title="#left_border_width (instance method)">#<strong>left_border_width</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method fetches the width for left border of a cell.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#left_border_width=-instance_method" title="#left_border_width= (instance method)">#<strong>left_border_width=</strong>(width)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method assigns a border width to the left side of a table cell.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#paragraph-instance_method" title="#paragraph (instance method)">#<strong>paragraph</strong>(style = nil)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method overloads the paragraph method inherited from the ComamndNode
class to forbid the creation of paragraphs.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#parent=-instance_method" title="#parent= (instance method)">#<strong>parent=</strong>(parent)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method overloads the parent= method inherited from the Node class to
forbid the alteration of the cells parent.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#right_border_width-instance_method" title="#right_border_width (instance method)">#<strong>right_border_width</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method fetches the width for right border of a cell.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#right_border_width=-instance_method" title="#right_border_width= (instance method)">#<strong>right_border_width=</strong>(width)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method assigns a border width to the right side of a table cell.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#table-instance_method" title="#table (instance method)">#<strong>table</strong>(rows, columns, *widths)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method overrides the table method inherited from CommandNode to forbid
its use in table cells.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#to_rtf-instance_method" title="#to_rtf (instance method)">#<strong>to_rtf</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method generates the RTF document text for a TableCellNode object.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#top_border_width-instance_method" title="#top_border_width (instance method)">#<strong>top_border_width</strong>  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method fetches the width for top border of a cell.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#top_border_width=-instance_method" title="#top_border_width= (instance method)">#<strong>top_border_width=</strong>(width)  &#x21d2; Object </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'>
<p>This method assigns a border width to the top side of a table cell.</p>
</div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="CommandNode.html" title="RRTF::CommandNode (class)">CommandNode</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="CommandNode.html#<<-instance_method" title="RRTF::CommandNode#&lt;&lt; (method)">#<<</a></span>, <span class='object_link'><a href="CommandNode.html#apply-instance_method" title="RRTF::CommandNode#apply (method)">#apply</a></span>, <span class='object_link'><a href="CommandNode.html#column_break-instance_method" title="RRTF::CommandNode#column_break (method)">#column_break</a></span>, <span class='object_link'><a href="CommandNode.html#footnote-instance_method" title="RRTF::CommandNode#footnote (method)">#footnote</a></span>, <span class='object_link'><a href="CommandNode.html#geometry-instance_method" title="RRTF::CommandNode#geometry (method)">#geometry</a></span>, <span class='object_link'><a href="CommandNode.html#image-instance_method" title="RRTF::CommandNode#image (method)">#image</a></span>, <span class='object_link'><a href="CommandNode.html#line_break-instance_method" title="RRTF::CommandNode#line_break (method)">#line_break</a></span>, <span class='object_link'><a href="CommandNode.html#link-instance_method" title="RRTF::CommandNode#link (method)">#link</a></span>, <span class='object_link'><a href="CommandNode.html#list-instance_method" title="RRTF::CommandNode#list (method)">#list</a></span>, <span class='object_link'><a href="CommandNode.html#section-instance_method" title="RRTF::CommandNode#section (method)">#section</a></span>, <span class='object_link'><a href="CommandNode.html#tab-instance_method" title="RRTF::CommandNode#tab (method)">#tab</a></span></p>

  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="ContainerNode.html" title="RRTF::ContainerNode (class)">ContainerNode</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="ContainerNode.html#[]-instance_method" title="RRTF::ContainerNode#[] (method)">#[]</a></span>, <span class='object_link'><a href="ContainerNode.html#each-instance_method" title="RRTF::ContainerNode#each (method)">#each</a></span>, <span class='object_link'><a href="ContainerNode.html#first-instance_method" title="RRTF::ContainerNode#first (method)">#first</a></span>, <span class='object_link'><a href="ContainerNode.html#last-instance_method" title="RRTF::ContainerNode#last (method)">#last</a></span>, <span class='object_link'><a href="ContainerNode.html#size-instance_method" title="RRTF::ContainerNode#size (method)">#size</a></span>, <span class='object_link'><a href="ContainerNode.html#store-instance_method" title="RRTF::ContainerNode#store (method)">#store</a></span></p>

  
  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Node.html" title="RRTF::Node (class)">Node</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="Node.html#is_root%3F-instance_method" title="RRTF::Node#is_root? (method)">#is_root?</a></span>, <span class='object_link'><a href="Node.html#next_node-instance_method" title="RRTF::Node#next_node (method)">#next_node</a></span>, <span class='object_link'><a href="Node.html#previous_node-instance_method" title="RRTF::Node#previous_node (method)">#previous_node</a></span>, <span class='object_link'><a href="Node.html#root-instance_method" title="RRTF::Node#root (method)">#root</a></span></p>
<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    #<strong>initialize</strong>(row, width = DEFAULT_WIDTH, style = nil, top = nil, right = nil, bottom = nil, left = nil)  &#x21d2; <tt><span class='object_link'><a href="" title="RRTF::TableCellNode (class)">TableCellNode</a></span></tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This is the constructor for the TableCellNode class.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>row
<dd>
<p>The row that the cell belongs to.</p>
</dd><dt>width
<dd>
<p>The width to be assigned to the cell. This defaults to
TableCellNode::DEFAULT_WIDTH.</p>
</dd><dt>style
<dd>
<p>The style that is applied to the cell. This must be a ParagraphStyle class.
Defaults to nil.</p>
</dd><dt>top
<dd>
<p>The border width for the cells top border. Defaults to nil.</p>
</dd><dt>right
<dd>
<p>The border width for the cells right hand border. Defaults to nil.</p>
</dd><dt>bottom
<dd>
<p>The border width for the cells bottom border. Defaults to nil.</p>
</dd><dt>left
<dd>
<p>The border width for the cells left hand border. Defaults to nil.</p>
</dd></dl>

<h4 id="label-Exceptions">Exceptions</h4>
<dl class="rdoc-list note-list"><dt>RTFError
<dd>
<p>Generated whenever an invalid style setting is specified.</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 38</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_row'>row</span><span class='comma'>,</span> <span class='id identifier rubyid_width'>width</span><span class='op'>=</span><span class='const'>DEFAULT_WIDTH</span><span class='comma'>,</span> <span class='id identifier rubyid_style'>style</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_top'>top</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_right'>right</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span>
               <span class='id identifier rubyid_bottom'>bottom</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_left'>left</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
   <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_row'>row</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
   <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>and</span> <span class='op'>!</span><span class='id identifier rubyid_style'>style</span><span class='period'>.</span><span class='id identifier rubyid_is_paragraph_style?'>is_paragraph_style?</span>
      <span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Non-paragraph style specified for TableCellNode </span><span class='tstring_end'>&quot;</span></span>\
                    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>constructor.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
   <span class='kw'>end</span>

   <span class='ivar'>@width</span>          <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_width'>width</span> <span class='op'>&gt;</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_width'>width</span> <span class='op'>:</span> <span class='const'><span class='object_link'><a href="#DEFAULT_WIDTH-constant" title="RRTF::TableCellNode::DEFAULT_WIDTH (constant)">DEFAULT_WIDTH</a></span></span>
   <span class='ivar'>@borders</span>        <span class='op'>=</span> <span class='lbracket'>[</span><span class='lparen'>(</span><span class='id identifier rubyid_top'>top</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_top'>top</span> <span class='op'>&gt;</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_top'>top</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span>
                      <span class='lparen'>(</span><span class='id identifier rubyid_right'>right</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_right'>right</span> <span class='op'>&gt;</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_right'>right</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span>
                      <span class='lparen'>(</span><span class='id identifier rubyid_bottom'>bottom</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_bottom'>bottom</span> <span class='op'>&gt;</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_bottom'>bottom</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span>
                      <span class='lparen'>(</span><span class='id identifier rubyid_left'>left</span> <span class='op'>!=</span> <span class='kw'>nil</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_left'>left</span> <span class='op'>&gt;</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_left'>left</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='rbracket'>]</span>
   <span class='ivar'>@shading_colour</span> <span class='op'>=</span> <span class='kw'>nil</span>
   <span class='ivar'>@style</span>          <span class='op'>=</span> <span class='id identifier rubyid_style'>style</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="shading_colour=-instance_method"></span>
      <div class="method_details first">
  <h3 class="signature first" id="shading_colour-instance_method">
  
    #<strong>shading_colour</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Attribute accessor.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


19
20
21</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 19</span>

<span class='kw'>def</span> <span class='id identifier rubyid_shading_colour'>shading_colour</span>
  <span class='ivar'>@shading_colour</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="style=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="style-instance_method">
  
    #<strong>style</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Attribute accessor.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


19
20
21</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 19</span>

<span class='kw'>def</span> <span class='id identifier rubyid_style'>style</span>
  <span class='ivar'>@style</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="width=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="width-instance_method">
  
    #<strong>width</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>Width of cell</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


17
18
19</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 17</span>

<span class='kw'>def</span> <span class='id identifier rubyid_width'>width</span>
  <span class='ivar'>@width</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">
  <h3 class="signature first" id="border_width=-instance_method">
  
    #<strong>border_width=</strong>(width)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method assigns a width, in twips, for the borders on all sides of the
cell. Negative widths will be ignored and a width of zero will switch the
border off.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>width
<dd>
<p>The setting for the width of the border.</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


78
79
80
81
82
83
84
85</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 78</span>

<span class='kw'>def</span> <span class='id identifier rubyid_border_width='>border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
   <span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
   <span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
   <span class='kw'>else</span>
      <span class='ivar'>@borders</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rbracket'>]</span>
   <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="border_widths-instance_method">
  
    #<strong>border_widths</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method retrieves an array with the cell border width settings. The
values are inserted in top, right, bottom, left order.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


156
157
158
159
160</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 156</span>

<span class='kw'>def</span> <span class='id identifier rubyid_border_widths'>border_widths</span>
   <span class='id identifier rubyid_widths'>widths</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
   <span class='ivar'>@borders</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_entry'>entry</span><span class='op'>|</span> <span class='id identifier rubyid_widths'>widths</span><span class='period'>.</span><span class='id identifier rubyid_push'>push</span><span class='lparen'>(</span><span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_entry'>entry</span><span class='rparen'>)</span><span class='rbrace'>}</span>
   <span class='id identifier rubyid_widths'>widths</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="bottom_border_width-instance_method">
  
    #<strong>bottom_border_width</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method fetches the width for bottom border of a cell.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


173
174
175</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 173</span>

<span class='kw'>def</span> <span class='id identifier rubyid_bottom_border_width'>bottom_border_width</span>
   <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="bottom_border_width=-instance_method">
  
    #<strong>bottom_border_width=</strong>(width)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method assigns a border width to the bottom side of a table cell.
Negative values are ignored and a value of 0 switches the border off.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>width
<dd>
<p>The new border width setting.</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


120
121
122
123
124
125
126
127</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 120</span>

<span class='kw'>def</span> <span class='id identifier rubyid_bottom_border_width='>bottom_border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
   <span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
   <span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
   <span class='kw'>else</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#BOTTOM-constant" title="RRTF::TableCellNode::BOTTOM (constant)">BOTTOM</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
   <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="left_border_width-instance_method">
  
    #<strong>left_border_width</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method fetches the width for left border of a cell.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


178
179
180</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 178</span>

<span class='kw'>def</span> <span class='id identifier rubyid_left_border_width'>left_border_width</span>
   <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="left_border_width=-instance_method">
  
    #<strong>left_border_width=</strong>(width)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method assigns a border width to the left side of a table cell.
Negative values are ignored and a value of 0 switches the border off.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>width
<dd>
<p>The new border width setting.</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


134
135
136
137
138
139
140
141</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 134</span>

<span class='kw'>def</span> <span class='id identifier rubyid_left_border_width='>left_border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
   <span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
   <span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
   <span class='kw'>else</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#LEFT-constant" title="RRTF::TableCellNode::LEFT (constant)">LEFT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
   <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="paragraph-instance_method">
  
    #<strong>paragraph</strong>(style = nil)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method overloads the paragraph method inherited from the ComamndNode
class to forbid the creation of paragraphs.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>style
<dd>
<p>The paragraph style, ignored</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


187
188
189
190</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 187</span>

<span class='kw'>def</span> <span class='id identifier rubyid_paragraph'>paragraph</span><span class='lparen'>(</span><span class='id identifier rubyid_style'>style</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
   <span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TableCellNode#paragraph() called. Table cells cannot </span><span class='tstring_end'>&quot;</span></span>\
                 <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>contain paragraphs.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="parent=-instance_method">
  
    #<strong>parent=</strong>(parent)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method overloads the parent= method inherited from the Node class to
forbid the alteration of the cells parent.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>parent
<dd>
<p>A reference to the new node parent.</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


197
198
199</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 197</span>

<span class='kw'>def</span> <span class='id identifier rubyid_parent='>parent=</span><span class='lparen'>(</span><span class='id identifier rubyid_parent'>parent</span><span class='rparen'>)</span>
   <span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Table cell nodes cannot have their parent changed.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="right_border_width-instance_method">
  
    #<strong>right_border_width</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method fetches the width for right border of a cell.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


168
169
170</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 168</span>

<span class='kw'>def</span> <span class='id identifier rubyid_right_border_width'>right_border_width</span>
   <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="right_border_width=-instance_method">
  
    #<strong>right_border_width=</strong>(width)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method assigns a border width to the right side of a table cell.
Negative values are ignored and a value of 0 switches the border off.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>width
<dd>
<p>The new border width setting.</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


106
107
108
109
110
111
112
113</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 106</span>

<span class='kw'>def</span> <span class='id identifier rubyid_right_border_width='>right_border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
   <span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
   <span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
   <span class='kw'>else</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#RIGHT-constant" title="RRTF::TableCellNode::RIGHT (constant)">RIGHT</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
   <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="table-instance_method">
  
    #<strong>table</strong>(rows, columns, *widths)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method overrides the table method inherited from CommandNode to forbid
its use in table cells.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>rows
<dd>
<p>The number of rows for the table.</p>
</dd><dt>columns
<dd>
<p>The number of columns for the table.</p>
</dd><dt>*widths
<dd>
<p>One or more integers representing the widths for the table columns.</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


209
210
211</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 209</span>

<span class='kw'>def</span> <span class='id identifier rubyid_table'>table</span><span class='lparen'>(</span><span class='id identifier rubyid_rows'>rows</span><span class='comma'>,</span> <span class='id identifier rubyid_columns'>columns</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_widths'>widths</span><span class='rparen'>)</span>
   <span class='const'><span class='object_link'><a href="RTFError.html" title="RRTF::RTFError (class)">RTFError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fire'><span class='object_link'><a href="RTFError.html#fire-class_method" title="RRTF::RTFError.fire (method)">fire</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>TableCellNode#table() called. Nested tables not allowed.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="to_rtf-instance_method">
  
    #<strong>to_rtf</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method generates the RTF document text for a TableCellNode object.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 214</span>

<span class='kw'>def</span> <span class='id identifier rubyid_to_rtf'>to_rtf</span>
   <span class='id identifier rubyid_text'>text</span>      <span class='op'>=</span> <span class='const'>StringIO</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
   <span class='id identifier rubyid_separator'>separator</span> <span class='op'>=</span> <span class='id identifier rubyid_split?'>split?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span>
   <span class='id identifier rubyid_line'>line</span>      <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_separator'>separator</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>

   <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\\pard\\intbl</span><span class='tstring_end'>&quot;</span></span>
   <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='ivar'>@style</span><span class='period'>.</span><span class='id identifier rubyid_prefix'>prefix</span><span class='lparen'>(</span><span class='id identifier rubyid_root'><span class='object_link'><a href="../top-level-namespace.html" title="Top Level Namespace (root)">root</a></span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@style</span> <span class='op'>!=</span> <span class='kw'>nil</span>
   <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_separator'>separator</span>
   <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_entry'>entry</span><span class='op'>|</span>
      <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_line'>line</span>
      <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='kw'>true</span>
      <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_entry'>entry</span><span class='period'>.</span><span class='id identifier rubyid_to_rtf'>to_rtf</span>
   <span class='kw'>end</span>
   <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='lparen'>(</span><span class='id identifier rubyid_split?'>split?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
   <span class='id identifier rubyid_text'>text</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\\cell</span><span class='tstring_end'>&quot;</span></span>

   <span class='id identifier rubyid_text'>text</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="top_border_width-instance_method">
  
    #<strong>top_border_width</strong>  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method fetches the width for top border of a cell.</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


163
164
165</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 163</span>

<span class='kw'>def</span> <span class='id identifier rubyid_top_border_width'>top_border_width</span>
   <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <h3 class="signature " id="top_border_width=-instance_method">
  
    #<strong>top_border_width=</strong>(width)  &#x21d2; <tt>Object</tt> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    
<p>This method assigns a border width to the top side of a table cell.
Negative values are ignored and a value of 0 switches the border off.</p>

<h4 id="label-Parameters">Parameters</h4>
<dl class="rdoc-list note-list"><dt>width
<dd>
<p>The new border width setting.</p>
</dd></dl>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


92
93
94
95
96
97
98
99</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/rrtf/node/table_cell_node.rb', line 92</span>

<span class='kw'>def</span> <span class='id identifier rubyid_top_border_width='>top_border_width=</span><span class='lparen'>(</span><span class='id identifier rubyid_width'>width</span><span class='rparen'>)</span>
   <span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_width'>width</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>0</span> <span class='op'>:</span> <span class='id identifier rubyid_width'>width</span>
   <span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
   <span class='kw'>else</span>
      <span class='ivar'>@borders</span><span class='lbracket'>[</span><span class='const'><span class='object_link'><a href="#TOP-constant" title="RRTF::TableCellNode::TOP (constant)">TOP</a></span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span>
   <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

      <div id="footer">
  Generated on Wed Aug  2 23:05:18 2017 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.9.9 (ruby-2.3.3).
</div>

    </div>
  </body>
</html>