doc/OmgValidator/Validators/AlphaValidator.html in omg_validator-0.0.8 vs doc/OmgValidator/Validators/AlphaValidator.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::AlphaValidator
- — 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 (A)</a> »
+ <a href="../../_index.html">Index (A)</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">AlphaValidator</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::AlphaValidator
</h1>
@@ -94,27 +101,35 @@
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
- <p>
-Checks whether input only contains alphabetic characters
-</p>
-<p>
-validates :name, alpha: true
-</p>
-<p>
-matches: alpha, testing, Hello, does not match: sub.domain, alpha-dash,
-id=343, (232)
-</p>
+
+<p>Checks whether input only contains alphabetic characters</p>
+<p>Matches:</p>
+<pre class="code ruby"><code>alpha, testing, Hello</code></pre>
+
+<p>Does not Match:</p>
+
+<pre class="code ruby"><code>sub.domain, alpha-dash, id=343, (232)</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'>:name</span><span class='comma'>,</span> <span class='label'>alpha:</span> <span class='kw'>true</span></pre>
+
+ </div>
+
</div>
@@ -140,10 +155,11 @@
+
<span class="summary_desc"><div class='inline'></div></span>
</li>
@@ -155,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/alpha_validator.rb', line 10</span>
+ <pre class="code"><span class="info file"># File 'lib/omg_validator/validators/alpha_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'>^([a-z])+$</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 contain only alphabetic characters</span><span class='tstring_end'>"</span></span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
@@ -196,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