doc/Trackerific.html in trackerific-0.3.1 vs doc/Trackerific.html in trackerific-0.3.2
- old
+ new
@@ -128,12 +128,11 @@
<span class="summary_desc"><div class='inline'><p>
-Checks a string for a valid package identifier, and returns a Trackerific
-class that should be able to track the package.
+Checks a string for a valid package tracking service.
</p>
</div></span>
</li>
@@ -155,33 +154,44 @@
</p><div class="docstring">
<div class="discussion">
<p>
-Checks a string for a valid package identifier, and returns a Trackerific
-class that should be able to track the package.
+Checks a string for a valid package tracking service
</p>
</div>
</div>
<div class="tags">
- <h3>Parameters:</h3>
+
+ <div class="examples">
+ <h3>Examples:</h3>
+
+ <h4><div class='inline'><p>
+Find out which service provider will track a valid FedEx number
+</p>
+</div></h4>
+ <pre class="example code"><span class='id include'>include</span> <span class='const'>Trackerific</span>
+<span class='id tracking_service'>tracking_service</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>183689015000001</span><span class='tstring_end'>"</span></span> <span class='comment'># => Trackerific::FedEx</span></pre>
+
+ </div>
+<h3>Parameters:</h3>
<ul class="param">
<li>
- <span class='name'>the</span>
+ <span class='name'>package_id</span>
<span class='type'>(<tt>String</tt>)</span>
—
<div class='inline'><p>
-package identifier.
+the package identifier
</p>
</div>
</li>
@@ -211,24 +221,24 @@
<tr>
<td>
<pre class="lines">
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56</pre>
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/trackerific.rb', line 46</span>
+ <pre class="code"><span class="info file"># File 'lib/trackerific.rb', line 77</span>
<span class='kw'>def</span> <span class='id tracking_service'>tracking_service</span><span class='lparen'>(</span><span class='id package_id'>package_id</span><span class='rparen'>)</span>
<span class='kw'>case</span> <span class='id package_id'>package_id</span>
<span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^.Z</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[HK].{10}$</span><span class='regexp_end'>/</span></span> <span class='kw'>then</span> <span class='const'>Trackerific</span><span class='op'>::</span><span class='const'>UPS</span>
<span class='kw'>when</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^96.{20}$</span><span class='regexp_end'>/</span></span> <span class='kw'>then</span> <span class='const'>Trackerific</span><span class='op'>::</span><span class='const'>FedEx</span>
@@ -247,10 +257,10 @@
</div>
</div>
<div id="footer">
- Generated on Mon Jun 13 14:22:51 2011 by
+ Generated on Mon Jun 13 16:20:05 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.1 (ruby-1.9.2).
</div>
</body>
\ No newline at end of file