<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Class: Bovem::Console
  
    &mdash; Documentation by YARD 0.8.6.2
  
</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">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!" + escape(window.location.href);
</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 id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (C)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../Bovem.html" title="Bovem (module)">Bovem</a></span></span>
     &raquo; 
    <span class="title">Console</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Class: Bovem::Console
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Object</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">Bovem::Console</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
      <dt class="r2">Includes:</dt>
      <dd class="r2"><span class='object_link'><a href="ConsoleMethods/Interactions.html" title="Bovem::ConsoleMethods::Interactions (module)">Bovem::ConsoleMethods::Interactions</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html" title="Bovem::ConsoleMethods::Logging (module)">Bovem::ConsoleMethods::Logging</a></span>, <span class='object_link'><a href="ConsoleMethods/Output.html" title="Bovem::ConsoleMethods::Output (module)">Bovem::ConsoleMethods::Output</a></span>, <span class='object_link'><a href="ConsoleMethods/StyleHandling.html" title="Bovem::ConsoleMethods::StyleHandling (module)">Bovem::ConsoleMethods::StyleHandling</a></span>, Lazier::I18n</dd>
      
    
  
  
  
    <dt class="r1 last">Defined in:</dt>
    <dd class="r1 last">lib/bovem/console.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>This is a text utility wrapper console I/O.</p>


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

</div>



  <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="#indentation-instance_method" title="#indentation (instance method)">- (Fixnum) <strong>indentation</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Current indentation width.</p>
</div></span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#indentation_string-instance_method" title="#indentation_string (instance method)">- (String) <strong>indentation_string</strong> </a>
    

    
  </span>
  
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>The string used for indentation.</p>
</div></span>
  
</li>

    
  </ul>




  
    <h2>
      Class Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#instance-class_method" title="instance (class method)">+ (Console) <strong>instance</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns a unique instance for Console.</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="#initialize-instance_method" title="#initialize (instance method)">- (Console) <strong>initialize</strong> </a>
    

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

  
    <span class="summary_desc"><div class='inline'><p>Initializes a new Console.</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#line_width-instance_method" title="#line_width (instance method)">- (Fixnum) <strong>line_width</strong> </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Get the width of the terminal.</p>
</div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods included from <span class='object_link'><a href="ConsoleMethods/Interactions.html" title="Bovem::ConsoleMethods::Interactions (module)">Bovem::ConsoleMethods::Interactions</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="ConsoleMethods/Interactions.html#read-instance_method" title="Bovem::ConsoleMethods::Interactions#read (method)">#read</a></span>, <span class='object_link'><a href="ConsoleMethods/Interactions.html#task-instance_method" title="Bovem::ConsoleMethods::Interactions#task (method)">#task</a></span></p>

  
  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods included from <span class='object_link'><a href="ConsoleMethods/Logging.html" title="Bovem::ConsoleMethods::Logging (module)">Bovem::ConsoleMethods::Logging</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="ConsoleMethods/Logging.html#begin-instance_method" title="Bovem::ConsoleMethods::Logging#begin (method)">#begin</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#debug-instance_method" title="Bovem::ConsoleMethods::Logging#debug (method)">#debug</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#error-instance_method" title="Bovem::ConsoleMethods::Logging#error (method)">#error</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#fatal-instance_method" title="Bovem::ConsoleMethods::Logging#fatal (method)">#fatal</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#get_banner-instance_method" title="Bovem::ConsoleMethods::Logging#get_banner (method)">#get_banner</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#info-instance_method" title="Bovem::ConsoleMethods::Logging#info (method)">#info</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#status-instance_method" title="Bovem::ConsoleMethods::Logging#status (method)">#status</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#warn-instance_method" title="Bovem::ConsoleMethods::Logging#warn (method)">#warn</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#write-instance_method" title="Bovem::ConsoleMethods::Logging#write (method)">#write</a></span>, <span class='object_link'><a href="ConsoleMethods/Logging.html#write_banner_aligned-instance_method" title="Bovem::ConsoleMethods::Logging#write_banner_aligned (method)">#write_banner_aligned</a></span></p>

  
  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods included from <span class='object_link'><a href="ConsoleMethods/Output.html" title="Bovem::ConsoleMethods::Output (module)">Bovem::ConsoleMethods::Output</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="ConsoleMethods/Output.html#format-instance_method" title="Bovem::ConsoleMethods::Output#format (method)">#format</a></span>, <span class='object_link'><a href="ConsoleMethods/Output.html#format_right-instance_method" title="Bovem::ConsoleMethods::Output#format_right (method)">#format_right</a></span>, <span class='object_link'><a href="ConsoleMethods/Output.html#indent-instance_method" title="Bovem::ConsoleMethods::Output#indent (method)">#indent</a></span>, <span class='object_link'><a href="ConsoleMethods/Output.html#reset_indentation-instance_method" title="Bovem::ConsoleMethods::Output#reset_indentation (method)">#reset_indentation</a></span>, <span class='object_link'><a href="ConsoleMethods/Output.html#set_indentation-instance_method" title="Bovem::ConsoleMethods::Output#set_indentation (method)">#set_indentation</a></span>, <span class='object_link'><a href="ConsoleMethods/Output.html#with_indentation-instance_method" title="Bovem::ConsoleMethods::Output#with_indentation (method)">#with_indentation</a></span>, <span class='object_link'><a href="ConsoleMethods/Output.html#wrap-instance_method" title="Bovem::ConsoleMethods::Output#wrap (method)">#wrap</a></span></p>

  
  
  
  
  
  
  
  
  <h3 class="inherited">Methods included from <span class='object_link'><a href="ConsoleMethods/StyleHandling.html" title="Bovem::ConsoleMethods::StyleHandling (module)">Bovem::ConsoleMethods::StyleHandling</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="ConsoleMethods/StyleHandling.html#replace_markers-instance_method" title="Bovem::ConsoleMethods::StyleHandling#replace_markers (method)">#replace_markers</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">
  
    - (<tt><span class='object_link'><a href="" title="Bovem::Console (class)">Console</a></span></tt>) <strong>initialize</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Initializes a new Console.</p>


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

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


602
603
604
605
606</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 602</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
  <span class='ivar'>@indentation</span> <span class='op'>=</span> <span class='int'>0</span>
  <span class='ivar'>@indentation_string</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_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:bovem</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../../locales/</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</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="indentation=-instance_method"></span>
      <div class="method_details first">
  <h3 class="signature first" id="indentation-instance_method">
  
    - (<tt>Fixnum</tt>) <strong>indentation</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Current indentation width.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Fixnum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>Current indentation width.</p>
</div>
      
    </li>
  
</ul>

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


584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 584</span>

<span class='kw'>class</span> <span class='const'>Console</span>
  <span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:indentation</span>
  <span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:indentation_string</span>

  <span class='id identifier rubyid_include'>include</span> <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>I18n</span>
  <span class='id identifier rubyid_include'>include</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>ConsoleMethods</span><span class='op'>::</span><span class='const'>StyleHandling</span>
  <span class='id identifier rubyid_include'>include</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>ConsoleMethods</span><span class='op'>::</span><span class='const'>Output</span>
  <span class='id identifier rubyid_include'>include</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>ConsoleMethods</span><span class='op'>::</span><span class='const'>Logging</span>
  <span class='id identifier rubyid_include'>include</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>ConsoleMethods</span><span class='op'>::</span><span class='const'>Interactions</span>

  <span class='comment'># Returns a unique instance for Console.
</span>  <span class='comment'>#
</span>  <span class='comment'># @return [Console] A new instance.
</span>  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
    <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Console</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
  <span class='kw'>end</span>

  <span class='comment'># Initializes a new Console.
</span>  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
    <span class='ivar'>@indentation</span> <span class='op'>=</span> <span class='int'>0</span>
    <span class='ivar'>@indentation_string</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_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:bovem</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../../locales/</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
  <span class='kw'>end</span>

  <span class='comment'># Get the width of the terminal.
</span>  <span class='comment'>#
</span>  <span class='comment'># @return [Fixnum] The current width of the terminal. If not possible to retrieve the width, it returns `80.
</span>  <span class='kw'>def</span> <span class='id identifier rubyid_line_width'>line_width</span>
    <span class='kw'>begin</span>
      <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>io/console</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>defined?</span><span class='lparen'>(</span><span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_winsize'>winsize</span><span class='rparen'>)</span>
      <span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_winsize'>winsize</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
    <span class='kw'>rescue</span>
      <span class='int'>80</span>
    <span class='kw'>end</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
      
      <span id="indentation_string=-instance_method"></span>
      <div class="method_details ">
  <h3 class="signature " id="indentation_string-instance_method">
  
    - (<tt>String</tt>) <strong>indentation_string</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>The string used for indentation.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The string used for indentation.</p>
</div>
      
    </li>
  
</ul>

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


584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 584</span>

<span class='kw'>class</span> <span class='const'>Console</span>
  <span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:indentation</span>
  <span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:indentation_string</span>

  <span class='id identifier rubyid_include'>include</span> <span class='const'>Lazier</span><span class='op'>::</span><span class='const'>I18n</span>
  <span class='id identifier rubyid_include'>include</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>ConsoleMethods</span><span class='op'>::</span><span class='const'>StyleHandling</span>
  <span class='id identifier rubyid_include'>include</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>ConsoleMethods</span><span class='op'>::</span><span class='const'>Output</span>
  <span class='id identifier rubyid_include'>include</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>ConsoleMethods</span><span class='op'>::</span><span class='const'>Logging</span>
  <span class='id identifier rubyid_include'>include</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>ConsoleMethods</span><span class='op'>::</span><span class='const'>Interactions</span>

  <span class='comment'># Returns a unique instance for Console.
</span>  <span class='comment'>#
</span>  <span class='comment'># @return [Console] A new instance.
</span>  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
    <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Console</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
  <span class='kw'>end</span>

  <span class='comment'># Initializes a new Console.
</span>  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
    <span class='ivar'>@indentation</span> <span class='op'>=</span> <span class='int'>0</span>
    <span class='ivar'>@indentation_string</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_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:bovem</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../../locales/</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
  <span class='kw'>end</span>

  <span class='comment'># Get the width of the terminal.
</span>  <span class='comment'>#
</span>  <span class='comment'># @return [Fixnum] The current width of the terminal. If not possible to retrieve the width, it returns `80.
</span>  <span class='kw'>def</span> <span class='id identifier rubyid_line_width'>line_width</span>
    <span class='kw'>begin</span>
      <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>io/console</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>defined?</span><span class='lparen'>(</span><span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_winsize'>winsize</span><span class='rparen'>)</span>
      <span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_winsize'>winsize</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
    <span class='kw'>rescue</span>
      <span class='int'>80</span>
    <span class='kw'>end</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="class_method_details" class="method_details_list">
    <h2>Class Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="instance-class_method">
  
    + (<tt><span class='object_link'><a href="" title="Bovem::Console (class)">Console</a></span></tt>) <strong>instance</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns a unique instance for Console.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt><span class='object_link'><a href="" title="Bovem::Console (class)">Console</a></span></tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>A new instance.</p>
</div>
      
    </li>
  
</ul>

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


597
598
599</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 597</span>

<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
  <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='op'>::</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Console</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</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="line_width-instance_method">
  
    - (<tt>Fixnum</tt>) <strong>line_width</strong> 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Get the width of the terminal.</p>


  </div>
</div>
<div class="tags">
  
<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>Fixnum</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The current width of the terminal. If not possible to retrieve the width, it returns `80.</p>
</div>
      
    </li>
  
</ul>

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


611
612
613
614
615
616
617
618</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/bovem/console.rb', line 611</span>

<span class='kw'>def</span> <span class='id identifier rubyid_line_width'>line_width</span>
  <span class='kw'>begin</span>
    <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>io/console</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>defined?</span><span class='lparen'>(</span><span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_winsize'>winsize</span><span class='rparen'>)</span>
    <span class='gvar'>$stdin</span><span class='period'>.</span><span class='id identifier rubyid_winsize'>winsize</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
  <span class='kw'>rescue</span>
    <span class='int'>80</span>
  <span class='kw'>end</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Sun Jul 14 15:10:15 2013 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.6.2 (ruby-1.9.3).
</div>

  </body>
</html>