X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/34d0bf15a6f4009de376ceed1d7d5cca24a8dfe7..5d701d44f30948d6d339a8d5806a083bdf76076d:/doc/Lyricli/Lyricli.html diff --git a/doc/Lyricli/Lyricli.html b/doc/Lyricli/Lyricli.html index 090262d..60c3a94 100644 --- a/doc/Lyricli/Lyricli.html +++ b/doc/Lyricli/Lyricli.html @@ -99,8 +99,21 @@ </dl> <div class="clear"></div> +<h2>Overview</h2><div class="docstring"> + <div class="discussion"> + <p> +This class has the basic logic for extracting the lyrics and controlling +the application +</p> + </div> +</div> +<div class="tags"> + + +</div> + @@ -131,7 +144,10 @@ - <span class="summary_desc"><div class='inline'></div></span> + <span class="summary_desc"><div class='inline'><p> +Exits with error when there is an empty field from the current track. +</p> +</div></span> </li> @@ -153,7 +169,11 @@ - <span class="summary_desc"><div class='inline'></div></span> + <span class="summary_desc"><div class='inline'><p> +Raises an InvalidLyricsException which means we did not get any valid +artist/song from any of the sources. +</p> +</div></span> </li> @@ -161,7 +181,7 @@ <li class="public "> <span class="summary_signature"> - <a href="#get_lyrics-instance_method" title="#get_lyrics (instance method)">- (Object) <strong>get_lyrics</strong> </a> + <a href="#get_lyrics-instance_method" title="#get_lyrics (instance method)">- (String) <strong>get_lyrics</strong> </a> @@ -175,7 +195,11 @@ - <span class="summary_desc"><div class='inline'></div></span> + <span class="summary_desc"><div class='inline'><p> +Extracts the current track, validates it and requests the lyrics from our +LyricsEngine. +</p> +</div></span> </li> @@ -200,7 +224,7 @@ <span class="summary_desc"><div class='inline'><p> -A new instance of Lyricli. +Constructor, initializes `@source_manager`. </p> </div></span> @@ -224,7 +248,11 @@ A new instance of Lyricli. - <span class="summary_desc"><div class='inline'></div></span> + <span class="summary_desc"><div class='inline'><p> +Set the `@current_track` instance variable by asking the SourceManager for +its current track. +</p> +</div></span> </li> @@ -247,7 +275,7 @@ A new instance of Lyricli. </h3><div class="docstring"> <div class="discussion"> <p> -A new instance of Lyricli +Constructor, initializes `@source_manager` </p> @@ -262,12 +290,12 @@ A new instance of Lyricli <pre class="lines"> -4 -5 -6</pre> +8 +9 +10</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 4</span> + <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 8</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='ivar'>@source_manager</span> <span class='op'>=</span> <span class='const'>SourceManager</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> @@ -293,19 +321,31 @@ A new instance of Lyricli -</h3><table class="source_code"> +</h3><div class="docstring"> + <div class="discussion"> + <p> +Exits with error when there is an empty field from the current track. +</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> <tr> <td> <pre class="lines"> -29 -30 -31 -32</pre> +44 +45 +46 +47</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 29</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_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'>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> @@ -327,7 +367,11 @@ A new instance of Lyricli </h3><div class="docstring"> <div class="discussion"> - + <p> +Raises an InvalidLyricsException which means we did not get any valid +artist/song from any of the sources +</p> + </div> </div> @@ -339,9 +383,15 @@ A new instance of Lyricli <li> - <span class='type'>(<tt>InvalidLyrics</tt>)</span> + <span class='type'>(<tt>Lyricli::InvalidLyricsException</tt>)</span> + + — + <div class='inline'><p> +because we found nothing +</p> +</div> </li> @@ -353,15 +403,15 @@ A new instance of Lyricli <pre class="lines"> -8 -9 -10</pre> +16 +17 +18</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 8</span> + <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'>InvalidLyrics</span> + <span class='id identifier rubyid_raise'>raise</span> <span class='const'>InvalidLyricsException</span> <span class='kw'>end</span></pre> </td> </tr> @@ -371,33 +421,65 @@ A new instance of Lyricli <div class="method_details "> <h3 class="signature " id="get_lyrics-instance_method"> - - (<tt>Object</tt>) <strong>get_lyrics</strong> + - (<tt>String</tt>) <strong>get_lyrics</strong> -</h3><table class="source_code"> +</h3><div class="docstring"> + <div class="discussion"> + <p> +Extracts the current track, validates it and requests the lyrics from our +LyricsEngine +</p> + + + </div> +</div> +<div class="tags"> + +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>String</tt>)</span> + + + + — + <div class='inline'><p> +the found lyrics, or a string indicating none were found +</p> +</div> + + </li> + +</ul> + +</div><table class="source_code"> <tr> <td> <pre class="lines"> -12 -13 -14 -15 -16 -17 -18 -19 -20 -21 -22 -23</pre> +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 12</span> + <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> @@ -425,18 +507,31 @@ A new instance of Lyricli -</h3><table class="source_code"> +</h3><div class="docstring"> + <div class="discussion"> + <p> +Set the `@current_track` instance variable by asking the SourceManager for +its current track +</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> <tr> <td> <pre class="lines"> -25 -26 -27</pre> +39 +40 +41</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 25</span> + <pre class="code"><span class="info file"># File 'lib/lyricli/lyricli.rb', line 39</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> @@ -451,7 +546,7 @@ A new instance of Lyricli </div> <div id="footer"> - Generated on Sat Oct 6 02:05:51 2012 by + Generated on Sat Oct 6 02:34:27 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>