forked from toretore/barby
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
245 changed files
with
13,681 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<!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> | ||
<title>Class: Barby::ASCIIOutputter</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
<meta http-equiv="Content-Script-Type" content="text/javascript" /> | ||
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> | ||
<script type="text/javascript"> | ||
// <![CDATA[ | ||
|
||
function popupCode( url ) { | ||
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") | ||
} | ||
|
||
function toggleCode( id ) { | ||
if ( document.getElementById ) | ||
elem = document.getElementById( id ); | ||
else if ( document.all ) | ||
elem = eval( "document.all." + id ); | ||
else | ||
return false; | ||
|
||
elemStyle = elem.style; | ||
|
||
if ( elemStyle.display != "block" ) { | ||
elemStyle.display = "block" | ||
} else { | ||
elemStyle.display = "none" | ||
} | ||
|
||
return true; | ||
} | ||
|
||
// Make codeblocks hidden by default | ||
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) | ||
|
||
// ]]> | ||
</script> | ||
|
||
</head> | ||
<body> | ||
|
||
|
||
|
||
<div id="classHeader"> | ||
<table class="header-table"> | ||
<tr class="top-aligned-row"> | ||
<td><strong>Class</strong></td> | ||
<td class="class-name-in-header">Barby::ASCIIOutputter</td> | ||
</tr> | ||
<tr class="top-aligned-row"> | ||
<td><strong>In:</strong></td> | ||
<td> | ||
<a href="../../files/lib/barby/outputter/ascii_outputter_rb.html"> | ||
lib/barby/outputter/ascii_outputter.rb | ||
</a> | ||
<br /> | ||
</td> | ||
</tr> | ||
|
||
<tr class="top-aligned-row"> | ||
<td><strong>Parent:</strong></td> | ||
<td> | ||
<a href="Outputter.html"> | ||
Outputter | ||
</a> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<!-- banner header --> | ||
|
||
<div id="bodyContent"> | ||
|
||
|
||
|
||
<div id="contextContent"> | ||
|
||
<div id="description"> | ||
<p> | ||
Outputs an ASCII representation of the barcode. This is mostly useful for | ||
printing the barcode directly to the terminal for testing. | ||
</p> | ||
<p> | ||
Registers <a href="ASCIIOutputter.html#M000118">to_ascii</a> | ||
</p> | ||
|
||
</div> | ||
|
||
|
||
</div> | ||
|
||
<div id="method-list"> | ||
<h3 class="section-bar">Methods</h3> | ||
|
||
<div class="name-list"> | ||
<a href="#M000118">to_ascii</a> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
|
||
<!-- if includes --> | ||
|
||
<div id="section"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<!-- if method_list --> | ||
<div id="methods"> | ||
<h3 class="section-bar">Public Instance methods</h3> | ||
|
||
<div id="method-M000118" class="method-detail"> | ||
<a name="M000118"></a> | ||
|
||
<div class="method-heading"> | ||
<a href="ASCIIOutputter.src/M000118.html" target="Code" class="method-signature" | ||
onclick="popupCode('ASCIIOutputter.src/M000118.html');return false;"> | ||
<span class="method-name">to_ascii</span><span class="method-args">(opts={})</span> | ||
</a> | ||
</div> | ||
|
||
<div class="method-description"> | ||
</div> | ||
</div> | ||
|
||
|
||
</div> | ||
|
||
|
||
</div> | ||
|
||
|
||
<div id="validator-badges"> | ||
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
|
||
<html> | ||
<head> | ||
<title>to_ascii (Barby::ASCIIOutputter)</title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | ||
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> | ||
</head> | ||
<body class="standalone-code"> | ||
<pre><span class="ruby-comment cmt"># File lib/barby/outputter/ascii_outputter.rb, line 14</span> | ||
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_ascii</span>(<span class="ruby-identifier">opts</span>={}) | ||
<span class="ruby-identifier">default_opts</span> = {<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">10</span>, <span class="ruby-identifier">:xdim</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>, <span class="ruby-identifier">:bar</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'#'</span>, <span class="ruby-identifier">:space</span> =<span class="ruby-operator">></span> <span class="ruby-value str">' '</span>} | ||
<span class="ruby-identifier">default_opts</span>.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">:height</span> =<span class="ruby-operator">></span> <span class="ruby-value">1</span>, <span class="ruby-identifier">:bar</span> =<span class="ruby-operator">></span> <span class="ruby-value str">' X '</span>, <span class="ruby-identifier">:space</span> =<span class="ruby-operator">></span> <span class="ruby-value str">' '</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">barcode</span>.<span class="ruby-identifier">two_dimensional?</span> | ||
<span class="ruby-identifier">opts</span> = <span class="ruby-identifier">default_opts</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">opts</span>) | ||
|
||
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">barcode</span>.<span class="ruby-identifier">two_dimensional?</span> | ||
<span class="ruby-identifier">booleans</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">bools</span><span class="ruby-operator">|</span> | ||
<span class="ruby-identifier">line_to_ascii</span>(<span class="ruby-identifier">bools</span>, <span class="ruby-identifier">opts</span>) | ||
<span class="ruby-keyword kw">end</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">"\n"</span>) | ||
<span class="ruby-keyword kw">else</span> | ||
<span class="ruby-identifier">line_to_ascii</span>(<span class="ruby-identifier">booleans</span>, <span class="ruby-identifier">opts</span>) | ||
<span class="ruby-keyword kw">end</span> | ||
<span class="ruby-keyword kw">end</span></pre> | ||
</body> | ||
</html> |
Oops, something went wrong.