doc/OmgValidator/Validators/ZipCodeValidator.html in omg_validator-0.0.8 vs doc/OmgValidator/Validators/ZipCodeValidator.html in omg_validator-1.0.0
- old
+ new
@@ -4,60 +4,67 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: OmgValidator::Validators::ZipCodeValidator
- — Documentation by YARD 0.7.5
+ — Documentation by YARD 0.8.2.1
</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
- relpath = '../..';
- if (relpath != '') relpath += '/';
+ 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>
- <script type="text/javascript" charset="utf-8">
- if (window.top.frames.main) document.body.className = 'frames';
- </script>
-
<div id="header">
<div id="menu">
- <a href="../../_index.html">Index (Z)</a> »
+ <a href="../../_index.html">Index (Z)</a> »
<span class='title'><span class='object_link'><a href="../../OmgValidator.html" title="OmgValidator (module)">OmgValidator</a></span></span> » <span class='title'><span class='object_link'><a href="../Validators.html" title="OmgValidator::Validators (module)">Validators</a></span></span>
»
<span class="title">ZipCodeValidator</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 id="class_list_link" href="#">Class List</a>
+ <a class="full_list_link" id="class_list_link"
+ href="../../class_list.html">
+ Class List
+ </a>
- <a id="method_list_link" href="#">Method List</a>
+ <a class="full_list_link" id="method_list_link"
+ href="../../method_list.html">
+ Method List
+ </a>
- <a id="file_list_link" href="#">File 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: OmgValidator::Validators::ZipCodeValidator
</h1>
@@ -94,26 +101,35 @@
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
- <p>
-Checks whether input is a valid zip code
-</p>
-<p>
-validates :zip_code, zip_code: true
-</p>
-<p>
-matches: 90210, 20037-8001, 12345 does not match: 123456, 20037-001, 207-01
-</p>
+
+<p>Checks whether input is a valid zip code</p>
+<p>Matches:</p>
+<pre class="code ruby"><code>90210, 20037-8001, 12345</code></pre>
+
+<p>Does not match:</p>
+
+<pre class="code ruby"><code>123456, 20037-001, 207-01</code></pre>
+
+
</div>
</div>
<div class="tags">
+ <div class="examples">
+ <p class="tag_title">Examples:</p>
+
+
+ <pre class="example code"><span class='id identifier rubyid_validates'>validates</span> <span class='symbol'>:zip_code</span><span class='comma'>,</span> <span class='label'>zip_code:</span> <span class='kw'>true</span></pre>
+
+ </div>
+
</div>
@@ -139,10 +155,11 @@
+
<span class="summary_desc"><div class='inline'></div></span>
</li>
@@ -154,38 +171,40 @@
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
+
-
<div class="method_details first">
- <p class="signature first" id="validate_each-instance_method">
+ <h3 class="signature first" id="validate_each-instance_method">
- (<tt>Object</tt>) <strong>validate_each</strong>(record, attribute, value)
-</p><table class="source_code">
+
+
+</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
-10
-11
-12
-13
14
15
-16</pre>
+16
+17
+18
+19
+20</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/omg_validator/validators/zip_code_validator.rb', line 10</span>
+ <pre class="code"><span class="info file"># File 'lib/omg_validator/validators/zip_code_validator.rb', line 14</span>
<span class='kw'>def</span> <span class='id identifier rubyid_validate_each'>validate_each</span><span class='lparen'>(</span><span class='id identifier rubyid_record'>record</span><span class='comma'>,</span> <span class='id identifier rubyid_attribute'>attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
- <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
<span class='id identifier rubyid_reg'>reg</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\d{5}(-\d{4})?$</span><span class='regexp_end'>/i</span></span>
<span class='kw'>unless</span> <span class='id identifier rubyid_reg'>reg</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
<span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_errors'>errors</span><span class='lbracket'>[</span><span class='id identifier rubyid_attribute'>attribute</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>must be a valid zip code</span><span class='tstring_end'>"</span></span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
@@ -195,14 +214,14 @@
</div>
</div>
</div>
-
+
<div id="footer">
- Generated on Thu Apr 5 00:05:42 2012 by
+ Generated on Sun Sep 23 13:47:01 2012 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.7.5 (ruby-1.9.2).
+ 0.8.2.1 (ruby-1.9.3).
</div>
</body>
</html>
\ No newline at end of file