<?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: String</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">String</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/lib/utility/utility_rb.html">
lib/utility/utility.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="124,21,196,69" href="String.html" alt="String
">
<area shape="RECT" coords="17,17,110,61" href="Utility.html" alt="Utility
">
</map>
<img src="../dot/f_58.png" usemap="#map" border=0 alt="TopLevel">
</div>
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000307">encrypt</a>
<a href="#M000305">is_match?</a>
<a href="#M000306">is_passwd?</a>
<a href="#M000304">is_prefix?</a>
<a href="#M000308">proper_name</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-M000307" class="method-detail">
<a name="M000307"></a>
<div class="method-heading">
<a href="String.src/M000307.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000307.html');return false;">
<span class="method-name">encrypt</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Encrypts a password
</p>
<dl>
<dt><tt>return</tt></dt><dd>The encrypted string
</dd>
</dl>
</div>
</div>
<div id="method-M000305" class="method-detail">
<a name="M000305"></a>
<div class="method-heading">
<a href="String.src/M000305.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000305.html');return false;">
<span class="method-name">is_match?</span><span class="method-args">(str)</span>
</a>
</div>
<div class="method-description">
<p>
Takes a string containing a list of keywords, like ‘hello
world’, and checks if ‘str’ is a prefix of any of those
words? "hell" would be true
</p>
</div>
</div>
<div id="method-M000306" class="method-detail">
<a name="M000306"></a>
<div class="method-heading">
<a href="String.src/M000306.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000306.html');return false;">
<span class="method-name">is_passwd?</span><span class="method-args">(pwd)</span>
</a>
</div>
<div class="method-description">
<p>
Compares the password with the string
</p>
<dl>
<dt><tt>pwd</tt></dt><dd>The encrypted password
</dd>
<dt><tt>return</tt></dt><dd>true if they are equal, false if not
</dd>
</dl>
</div>
</div>
<div id="method-M000304" class="method-detail">
<a name="M000304"></a>
<div class="method-heading">
<a href="String.src/M000304.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000304.html');return false;">
<span class="method-name">is_prefix?</span><span class="method-args">(str)</span>
</a>
</div>
<div class="method-description">
<p>
Checks if ‘str’ is a prefix of this string
</p>
</div>
</div>
<div id="method-M000308" class="method-detail">
<a name="M000308"></a>
<div class="method-heading">
<a href="String.src/M000308.html" target="Code" class="method-signature"
onclick="popupCode('String.src/M000308.html');return false;">
<span class="method-name">proper_name</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
Make string into proper name removes digits, downcases and then capitalizes
words. Sorry it doesn’t like McManus but likes O’Mally
</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>