X-Git-Url: https://git.r.bdr.sh/rbdr/lyricli.rb/blobdiff_plain/34d0bf15a6f4009de376ceed1d7d5cca24a8dfe7..ce24fb02b031b73f9285539bcfe399f970842981:/doc/Lyricli/LyricsEngine.html?ds=inline diff --git a/doc/Lyricli/LyricsEngine.html b/doc/Lyricli/LyricsEngine.html index 23a5f73..4d7c669 100644 --- a/doc/Lyricli/LyricsEngine.html +++ b/doc/Lyricli/LyricsEngine.html @@ -103,8 +103,20 @@
+

Overview

+
+

+This class gets the lyrics according to a given artist and song name. +

+
+
+
+ + +
+ @@ -121,7 +133,7 @@
  • - - (Object) get_lyrics + - (String) get_lyrics @@ -135,7 +147,10 @@ -
    +

    +Asks Lyrics Wiki for the lyrics, also cleans up the output a little. +

    +
  • @@ -160,7 +175,7 @@

    -A new instance of LyricsEngine. +Starts a new instance of LyricsEngine.

    @@ -196,14 +211,52 @@ A new instance of LyricsEngine.

    -A new instance of LyricsEngine +Starts a new instance of LyricsEngine

    +

    Parameters:

    + +
    @@ -211,12 +264,12 @@ A new instance of LyricsEngine
     
     
    -6
    -7
    -8
    +12 +13 +14
    -
    # File 'lib/lyricli/lyrics_engine.rb', line 6
    +      
    # File 'lib/lyricli/lyrics_engine.rb', line 12
     
     def initialize(artist, song)
       @provider = URI("http://lyrics.wikia.com/api.php?artist=#{sanitize_param artist}&song=#{sanitize_param song}&fmt=realjson")
    @@ -236,27 +289,49 @@ A new instance of LyricsEngine
           

    - - (Object) get_lyrics + - (String) get_lyrics -

    +
    +
    +

    +Asks Lyrics Wiki for the lyrics, also cleans up the output a little. +

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (String) + + + + — +

      +the lyrics +

      +
      + +
    • + +
    + +
     
     
    -10
    -11
    -12
    -13
    -14
    -15
    -16
    -17
    -18
     19
     20
     21
    @@ -268,10 +343,19 @@ A new instance of LyricsEngine
     27
     28
     29
    -30
    +30 +31 +32 +33 +34 +35 +36 +37 +38 +39
    -
    # File 'lib/lyricli/lyrics_engine.rb', line 10
    +      
    # File 'lib/lyricli/lyrics_engine.rb', line 19
     
     def get_lyrics
       begin
    @@ -281,7 +365,7 @@ A new instance of LyricsEngine
         doc = Nokogiri::HTML(open(response['url']))
         node = doc.search(".lyricbox").first
       rescue
    -    raise Lyricli::LyricsNotFoundException
    +    raise Exceptions::LyricsNotFoundError
       end
     
       node.search(".rtMatcher").each do |n|
    @@ -304,7 +388,7 @@ A new instance of LyricsEngine