<?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: Farts::Lib</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">Farts::Lib</td> </tr> <tr class="top-aligned-row"> <td><strong>In:</strong></td> <td> <a href="../../files/lib/farts/farts_lib_rb.html"> lib/farts/farts_lib.rb </a> <br /> </td> </tr> <tr class="top-aligned-row"> <td><strong>Parent:</strong></td> <td> Object </td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="diagram"> <map id="map" name="map"> <area shape="RECT" coords="613,113,701,161" href="SyntaxNode.html" alt="SyntaxNode "> <area shape="RECT" coords="28,209,145,257" href="LiteralSyntaxNode.html" alt="LiteralSyntaxNode "> <area shape="RECT" coords="169,209,297,257" href="ProgramSyntaxNode.html" alt="ProgramSyntaxNode "> <area shape="RECT" coords="321,209,425,257" href="CallSyntaxNode.html" alt="CallSyntaxNode "> <area shape="RECT" coords="449,209,580,257" href="CommentSyntaxNode.html" alt="CommentSyntaxNode "> <area shape="RECT" coords="604,209,710,257" href="EndSyntaxNode.html" alt="EndSyntaxNode "> <area shape="RECT" coords="734,209,865,257" href="AttributeSyntaxNode.html" alt="AttributeSyntaxNode "> <area shape="RECT" coords="889,209,1020,257" href="LocalVarSyntaxNode.html" alt="LocalVarSyntaxNode "> <area shape="RECT" coords="1044,209,1137,257" href="IfSyntaxNode.html" alt="IfSyntaxNode "> <area shape="RECT" coords="1161,209,1294,257" href="CommandSyntaxNode.html" alt="CommandSyntaxNode "> <area shape="RECT" coords="377,17,468,65" href="../Racc/Parser.html" alt="Racc::Parser "> <area shape="RECT" coords="386,113,458,161" href="Parser.html" alt="Parser "> <area shape="RECT" coords="496,17,594,65" href="../StringScanner.html" alt="StringScanner "> <area shape="RECT" coords="509,113,581,161" href="Lexer.html" alt="Lexer "> <area shape="RECT" coords="192,113,269,161" href="Interpreter.html" alt="Interpreter "> <area shape="RECT" coords="32,113,104,161" href="Lib.html" alt="Lib "> <area shape="RECT" coords="17,91,1305,268" href="../Farts.html" alt="Farts "> </map> <img src="../../dot/m_22_0.png" usemap="#map" border=0 alt="Module: Farts"> </div> <div id="description"> <p> The <a href="Lib.html">Lib</a> class implements all the functions available to <a href="../Farts.html">Farts</a> programs. </p> </div> </div> <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> <a href="#M000340">ischaracter</a> <a href="#M000341">iscritter</a> <a href="#M000342">isroom</a> <a href="#M000343">level</a> <a href="#M000339">rand</a> <a href="#M000344">sex</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-M000340" class="method-detail"> <a name="M000340"></a> <div class="method-heading"> <a href="Lib.src/M000340.html" target="Code" class="method-signature" onclick="popupCode('Lib.src/M000340.html');return false;"> <span class="method-name">ischaracter</span><span class="method-args">(actor)</span> </a> </div> <div class="method-description"> <p> Is actor a <a href="../Character.html">Character</a> </p> </div> </div> <div id="method-M000341" class="method-detail"> <a name="M000341"></a> <div class="method-heading"> <a href="Lib.src/M000341.html" target="Code" class="method-signature" onclick="popupCode('Lib.src/M000341.html');return false;"> <span class="method-name">iscritter</span><span class="method-args">(actor)</span> </a> </div> <div class="method-description"> <p> Is actor a Critter </p> </div> </div> <div id="method-M000342" class="method-detail"> <a name="M000342"></a> <div class="method-heading"> <a href="Lib.src/M000342.html" target="Code" class="method-signature" onclick="popupCode('Lib.src/M000342.html');return false;"> <span class="method-name">isroom</span><span class="method-args">(actor)</span> </a> </div> <div class="method-description"> <p> Is actor a <a href="../Room.html">Room</a> </p> </div> </div> <div id="method-M000343" class="method-detail"> <a name="M000343"></a> <div class="method-heading"> <a href="Lib.src/M000343.html" target="Code" class="method-signature" onclick="popupCode('Lib.src/M000343.html');return false;"> <span class="method-name">level</span><span class="method-args">(actor)</span> </a> </div> <div class="method-description"> <p> Get the level of actor </p> </div> </div> <div id="method-M000339" class="method-detail"> <a name="M000339"></a> <div class="method-heading"> <a href="Lib.src/M000339.html" target="Code" class="method-signature" onclick="popupCode('Lib.src/M000339.html');return false;"> <span class="method-name">rand</span><span class="method-args">(num)</span> </a> </div> <div class="method-description"> <p> Is random percentage less than or equal to num </p> </div> </div> <div id="method-M000344" class="method-detail"> <a name="M000344"></a> <div class="method-heading"> <a href="Lib.src/M000344.html" target="Code" class="method-signature" onclick="popupCode('Lib.src/M000344.html');return false;"> <span class="method-name">sex</span><span class="method-args">(actor)</span> </a> </div> <div class="method-description"> <p> Get the sex of actor </p> </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>