]> git.r.bdr.sh - rbdr/lyricli.rb/blobdiff - doc/Lyricli.html
Merge pull request #3 from orlando/master
[rbdr/lyricli.rb] / doc / Lyricli.html
index 8c0685a78268bb613f3e13d1c1b47c4471932f49..cb9593318ba79791ea3944a7e486d5ce7d47c5d0 100644 (file)
@@ -6,7 +6,7 @@
 <title>
   Module: Lyricli
   
 <title>
   Module: Lyricli
   
-    &mdash; Documentation by YARD 0.8.1
+    &mdash; Documentation by YARD 0.8.2.1
   
 </title>
 
   
 </title>
 
   
     <dt class="r1 last">Defined in:</dt>
     <dd class="r1 last">lib/lyricli.rb<span class="defines">,<br />
   
     <dt class="r1 last">Defined in:</dt>
     <dd class="r1 last">lib/lyricli.rb<span class="defines">,<br />
-  lib/lyricli/util.rb,<br /> lib/lyricli/sources/rdio.rb,<br /> lib/lyricli/lyrics_engine.rb,<br /> lib/lyricli/configuration.rb,<br /> lib/lyricli/source_manager.rb,<br /> lib/lyricli/sources/arguments.rb</span>
+  lib/lyricli/util.rb,<br /> lib/lyricli/sources.rb,<br /> lib/lyricli/lyricli.rb,<br /> lib/lyricli/exceptions.rb,<br /> lib/lyricli/sources/rdio.rb,<br /> lib/lyricli/configuration.rb,<br /> lib/lyricli/lyrics_engine.rb,<br /> lib/lyricli/sources/itunes.rb,<br /> lib/lyricli/source_manager.rb,<br /> lib/lyricli/sources/arguments.rb,<br /> lib/lyricli/exceptions/reset_source_error.rb,<br /> lib/lyricli/exceptions/start_source_error.rb,<br /> lib/lyricli/exceptions/enable_source_error.rb,<br /> lib/lyricli/exceptions/unknown_source_error.rb,<br /> lib/lyricli/exceptions/invalid_lyrics_error.rb,<br /> lib/lyricli/exceptions/disable_source_error.rb,<br /> lib/lyricli/exceptions/lyrics_not_found_error.rb,<br /> lib/lyricli/exceptions/source_configuration_error.rb</span>
 </dd>
   
 </dl>
 <div class="clear"></div>
 
 </dd>
   
 </dl>
 <div class="clear"></div>
 
-<h2>Defined Under Namespace</h2>
+<h2>Overview</h2><div class="docstring">
+  <div class="discussion">
+    <p>
+The Lyricli module allows you to easily search for lyrics by looking for
+song and artist data from diverse sources.
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+
+</div><h2>Defined Under Namespace</h2>
 <p class="children">
   
     
 <p class="children">
   
     
-      <strong class="modules">Modules:</strong> <span class='object_link'><a href="Lyricli/Sources.html" title="Lyricli::Sources (module)">Sources</a></span>, <span class='object_link'><a href="Lyricli/Util.html" title="Lyricli::Util (module)">Util</a></span>
+      <strong class="modules">Modules:</strong> <span class='object_link'><a href="Lyricli/Exceptions.html" title="Lyricli::Exceptions (module)">Exceptions</a></span>, <span class='object_link'><a href="Lyricli/Sources.html" title="Lyricli::Sources (module)">Sources</a></span>, <span class='object_link'><a href="Lyricli/Util.html" title="Lyricli::Util (module)">Util</a></span>
     
   
     
     
   
     
         <li class="public ">
   <span class="summary_signature">
     
         <li class="public ">
   <span class="summary_signature">
     
-      <a href="#execute-class_method" title="execute (class method)">+ (Object) <strong>execute</strong> </a>
+      <a href="#disable-class_method" title="disable (class method)">+ (Object) <strong>disable</strong>(source_name) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Disables a source via the Source Manager.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#enable-class_method" title="enable (class method)">+ (Object) <strong>enable</strong>(source_name) </a>
     
 
     
     
 
     
   
 
   
   
 
   
-    <span class="summary_desc"><div class='inline'></div></span>
+    <span class="summary_desc"><div class='inline'><p>
+Enables a source via the Source Manager.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#lyrics-class_method" title="lyrics (class method)">+ (String) <strong>lyrics</strong> </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Creates a new Lyricli instance and returns lyrics by going through the
+sources.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#reset-class_method" title="reset (class method)">+ (Object) <strong>reset</strong>(source_name) </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Resets all configuration for a source via the Source Manager.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#sources-class_method" title="sources (class method)">+ (String) <strong>sources</strong> </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Returns a list of the available sources to enable or disable.
+</p>
+</div></span>
+  
+</li>
+
+      
+        <li class="public ">
+  <span class="summary_signature">
+    
+      <a href="#version-class_method" title="version (class method)">+ (String) <strong>version</strong> </a>
+    
+
+    
+  </span>
+  
+  
+  
+  
+  
+  
+  
+
+  
+    <span class="summary_desc"><div class='inline'><p>
+Returns the version of the library.
+</p>
+</div></span>
   
 </li>
 
   
 </li>
 
 
     
       <div class="method_details first">
 
     
       <div class="method_details first">
-  <h3 class="signature first" id="execute-class_method">
+  <h3 class="signature first" id="disable-class_method">
+  
+    + (<tt>Object</tt>) <strong>disable</strong>(source_name) 
+  
+
+  
+
+  
+</h3><div class="docstring">
+  <div class="discussion">
+    <p>
+Disables a source via the Source Manager
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+70
+71
+72
+73
+74
+75
+76
+77</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 70</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_disable'>disable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
+  <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
+  <span class='kw'>begin</span>
+    <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_disable'>disable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
+  <span class='kw'>rescue</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnknownSourceError</span>
+    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>There is no such Source</span><span class='tstring_end'>&quot;</span></span>
+  <span class='kw'>end</span>
+<span class='kw'>end</span></pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <h3 class="signature " id="enable-class_method">
+  
+    + (<tt>Object</tt>) <strong>enable</strong>(source_name) 
+  
+
+  
+
+  
+</h3><div class="docstring">
+  <div class="discussion">
+    <p>
+Enables a source via the Source Manager
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+60
+61
+62
+63
+64
+65
+66
+67</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 60</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
+  <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
+  <span class='kw'>begin</span>
+    <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_enable'>enable</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
+  <span class='kw'>rescue</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnknownSourceError</span>
+    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>There is no such Source</span><span class='tstring_end'>&quot;</span></span>
+  <span class='kw'>end</span>
+<span class='kw'>end</span></pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <h3 class="signature " id="lyrics-class_method">
+  
+    + (<tt>String</tt>) <strong>lyrics</strong> 
   
   
-    + (<tt>Object</tt>) <strong>execute</strong> 
+
   
 
   
   
 
   
+</h3><div class="docstring">
+  <div class="discussion">
+    <p>
+Creates a new Lyricli instance and returns lyrics by going through the
+sources.
+</p>
 
 
+
+  </div>
+</div>
+<div class="tags">
   
   
-</h3><table class="source_code">
+<p class="tag_title">Returns:</p>
+<ul class="return">
+  
+    <li>
+      
+      
+        <span class='type'>(<tt>String</tt>)</span>
+      
+      
+      
+        &mdash;
+        <div class='inline'><p>
+the fetched lyrics
+</p>
+</div>
+      
+    </li>
+  
+</ul>
+
+</div><table class="source_code">
   <tr>
     <td>
       <pre class="lines">
 
 
   <tr>
     <td>
       <pre class="lines">
 
 
-29
-30
-31
-32</pre>
+40
+41
+42
+43</pre>
     </td>
     <td>
     </td>
     <td>
-      <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 29</span>
+      <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 40</span>
 
 
-<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute'>execute</span>
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_lyrics'>lyrics</span>
   <span class='ivar'>@lyricli</span> <span class='op'>=</span> <span class='const'>Lyricli</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
   <span class='ivar'>@lyricli</span><span class='period'>.</span><span class='id identifier rubyid_get_lyrics'>get_lyrics</span>
 <span class='kw'>end</span></pre>
     </td>
   </tr>
 </table>
   <span class='ivar'>@lyricli</span> <span class='op'>=</span> <span class='const'>Lyricli</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
   <span class='ivar'>@lyricli</span><span class='period'>.</span><span class='id identifier rubyid_get_lyrics'>get_lyrics</span>
 <span class='kw'>end</span></pre>
     </td>
   </tr>
 </table>
+</div>
+    
+      <div class="method_details ">
+  <h3 class="signature " id="reset-class_method">
+  
+    + (<tt>Object</tt>) <strong>reset</strong>(source_name) 
+  
+
+  
+
+  
+</h3><div class="docstring">
+  <div class="discussion">
+    <p>
+Resets all configuration for a source via the Source Manager
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+80
+81
+82
+83
+84
+85
+86
+87</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 80</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
+  <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
+  <span class='kw'>begin</span>
+    <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_reset'>reset</span><span class='lparen'>(</span><span class='id identifier rubyid_source_name'>source_name</span><span class='rparen'>)</span>
+  <span class='kw'>rescue</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnknownSourceError</span>
+    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>There is no such Source</span><span class='tstring_end'>&quot;</span></span>
+  <span class='kw'>end</span>
+<span class='kw'>end</span></pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <h3 class="signature " id="sources-class_method">
+  
+    + (<tt>String</tt>) <strong>sources</strong> 
+  
+
+  
+
+  
+</h3><div class="docstring">
+  <div class="discussion">
+    <p>
+Returns a list of the available sources to enable or disable
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+<p class="tag_title">Returns:</p>
+<ul class="return">
+  
+    <li>
+      
+      
+        <span class='type'>(<tt>String</tt>)</span>
+      
+      
+      
+        &mdash;
+        <div class='inline'><p>
+the list of available sources. Enabled sources have a star appended.
+</p>
+</div>
+      
+    </li>
+  
+</ul>
+
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+54
+55
+56
+57</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 54</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_sources'>sources</span>
+  <span class='id identifier rubyid_source_manager'>source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
+  <span class='id identifier rubyid_source_manager'>source_manager</span><span class='period'>.</span><span class='id identifier rubyid_available_sources'>available_sources</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>, </span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
+<span class='kw'>end</span></pre>
+    </td>
+  </tr>
+</table>
+</div>
+    
+      <div class="method_details ">
+  <h3 class="signature " id="version-class_method">
+  
+    + (<tt>String</tt>) <strong>version</strong> 
+  
+
+  
+
+  
+</h3><div class="docstring">
+  <div class="discussion">
+    <p>
+Returns the version of the library
+</p>
+
+
+  </div>
+</div>
+<div class="tags">
+  
+<p class="tag_title">Returns:</p>
+<ul class="return">
+  
+    <li>
+      
+      
+        <span class='type'>(<tt>String</tt>)</span>
+      
+      
+      
+        &mdash;
+        <div class='inline'><p>
+the version
+</p>
+</div>
+      
+    </li>
+  
+</ul>
+
+</div><table class="source_code">
+  <tr>
+    <td>
+      <pre class="lines">
+
+
+47
+48
+49</pre>
+    </td>
+    <td>
+      <pre class="code"><span class="info file"># File 'lib/lyricli.rb', line 47</span>
+
+<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span>
+  <span class='const'>Gem</span><span class='period'>.</span><span class='id identifier rubyid_loaded_specs'>loaded_specs</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>lyricli</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span>
+<span class='kw'>end</span></pre>
+    </td>
+  </tr>
+</table>
 </div>
     
   </div>
 </div>
     
   </div>
 </div>
 
     <div id="footer">
 </div>
 
     <div id="footer">
-  Generated on Fri Oct  5 22:31:14 2012 by
+  Generated on Sat Oct  6 03:20:24 2012 by
   <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
   <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
-  0.8.1 (ruby-1.9.2).
+  0.8.2.1 (ruby-1.9.2).
 </div>
 
   </body>
 </div>
 
   </body>