]> git.r.bdr.sh - rbdr/lyricli.rb/blobdiff - doc/Lyricli/Lyricli.html
fixes warning in ruby 2.1.1
[rbdr/lyricli.rb] / doc / Lyricli / Lyricli.html
index 60c3a9487d2b5bbc02a5124a4af60647b104ae42..e3accb5aea6f641012fee32b993385c97d432be2 100644 (file)
@@ -170,7 +170,7 @@ Exits with error when there is an empty field from the current track.
 
   
     <span class="summary_desc"><div class='inline'><p>
-Raises an InvalidLyricsException which means we did not get any valid
+Raises an InvalidLyricsError which means we did not get any valid
 artist/song from any of the sources.
 </p>
 </div></span>
@@ -339,15 +339,17 @@ Exits with error when there is an empty field from the current track.
       <pre class="lines">
 
 
-44
-45
-46
-47</pre>
+49
+50
+51
+52
+53</pre>
     </td>
     <td>
-      <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 44</span>
+      <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 49</span>
 
 <span class='kw'>def</span> <span class='id identifier rubyid_check_params'>check_params</span>
+  <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_exit_with_error'>exit_with_error</span> <span class='kw'>unless</span> <span class='ivar'>@current_track</span>
   <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_exit_with_error'>exit_with_error</span> <span class='kw'>if</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:artist</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:artist</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
   <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_exit_with_error'>exit_with_error</span> <span class='kw'>if</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:song</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>or</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:song</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
 <span class='kw'>end</span></pre>
@@ -368,7 +370,7 @@ Exits with error when there is an empty field from the current track.
 </h3><div class="docstring">
   <div class="discussion">
     <p>
-Raises an InvalidLyricsException which means we did not get any valid
+Raises an InvalidLyricsError which means we did not get any valid
 artist/song from any of the sources
 </p>
 
@@ -383,7 +385,7 @@ artist/song from any of the sources
     <li>
       
       
-        <span class='type'>(<tt>Lyricli::InvalidLyricsException</tt>)</span>
+        <span class='type'>(<tt><span class='object_link'><a href="Exceptions/InvalidLyricsError.html" title="Lyricli::Exceptions::InvalidLyricsError (class)">Lyricli::Exceptions::InvalidLyricsError</a></span></tt>)</span>
       
       
       
@@ -411,7 +413,7 @@ because we found nothing
       <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 16</span>
 
 <span class='kw'>def</span> <span class='id identifier rubyid_exit_with_error'>exit_with_error</span>
-  <span class='id identifier rubyid_raise'>raise</span> <span class='const'>InvalidLyricsException</span>
+  <span class='id identifier rubyid_raise'>raise</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>InvalidLyricsError</span>
 <span class='kw'>end</span></pre>
     </td>
   </tr>
@@ -476,21 +478,31 @@ the found lyrics, or a string indicating none were found
 32
 33
 34
-35</pre>
+35
+36
+37
+38
+39
+40</pre>
     </td>
     <td>
       <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 24</span>
 
 <span class='kw'>def</span> <span class='id identifier rubyid_get_lyrics'>get_lyrics</span>
-  <span class='id identifier rubyid_set_current_track'>set_current_track</span>
-  <span class='id identifier rubyid_check_params'>check_params</span>
+
+  <span class='kw'>begin</span>
+    <span class='id identifier rubyid_set_current_track'>set_current_track</span>
+    <span class='id identifier rubyid_check_params'>check_params</span>
+  <span class='kw'>rescue</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>InvalidLyricsError</span>
+    <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No Artist/Song could be found :(</span><span class='tstring_end'>&quot;</span></span>
+  <span class='kw'>end</span>
 
   <span class='id identifier rubyid_engine'>engine</span> <span class='op'>=</span> <span class='const'>LyricsEngine</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:artist</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='ivar'>@current_track</span><span class='lbracket'>[</span><span class='symbol'>:song</span><span class='rbracket'>]</span><span class='rparen'>)</span>
 
   <span class='kw'>begin</span>
-    <span class='id identifier rubyid_engine'>engine</span><span class='period'>.</span><span class='id identifier rubyid_get_lyrics'>get_lyrics</span>
-  <span class='kw'>rescue</span> <span class='const'>LyricsNotFoundException</span>
-    <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Lyrics not found :(</span><span class='tstring_end'>&quot;</span></span>
+    <span class='kw'>return</span> <span class='id identifier rubyid_engine'>engine</span><span class='period'>.</span><span class='id identifier rubyid_get_lyrics'>get_lyrics</span>
+  <span class='kw'>rescue</span> <span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>LyricsNotFoundError</span>
+    <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Lyrics not found :(</span><span class='tstring_end'>&quot;</span></span>
   <span class='kw'>end</span>
 <span class='kw'>end</span></pre>
     </td>
@@ -526,12 +538,12 @@ its current track
       <pre class="lines">
 
 
-39
-40
-41</pre>
+44
+45
+46</pre>
     </td>
     <td>
-      <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 39</span>
+      <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 44</span>
 
 <span class='kw'>def</span> <span class='id identifier rubyid_set_current_track'>set_current_track</span>
   <span class='ivar'>@current_track</span> <span class='op'>=</span> <span class='ivar'>@source_manager</span><span class='period'>.</span><span class='id identifier rubyid_current_track'>current_track</span>
@@ -546,7 +558,7 @@ its current track
 </div>
 
     <div id="footer">
-  Generated on Sat Oct  6 02:34:27 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>
   0.8.2.1 (ruby-1.9.2).
 </div>