Class: MusixMatch::LyricsSearchResult

Inherits:
Object
  • Object
show all
Defined in:
lib/musix_match/lyrics_search_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ LyricsSearchResult

Returns a new instance of LyricsSearchResult.



5
6
7
8
9
# File 'lib/musix_match/lyrics_search_result.rb', line 5

def initialize(response)
  @response = response
  @lyrics_list = []
  parse_response(response)
end

Instance Attribute Details

#availableObject (readonly)

Returns the value of attribute available.



3
4
5
# File 'lib/musix_match/lyrics_search_result.rb', line 3

def available
  @available
end

#execute_timeObject (readonly)

Returns the value of attribute execute_time.



3
4
5
# File 'lib/musix_match/lyrics_search_result.rb', line 3

def execute_time
  @execute_time
end

#lyrics_listObject (readonly)

Returns the value of attribute lyrics_list.



3
4
5
# File 'lib/musix_match/lyrics_search_result.rb', line 3

def lyrics_list
  @lyrics_list
end

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/musix_match/lyrics_search_result.rb', line 3

def response
  @response
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



3
4
5
# File 'lib/musix_match/lyrics_search_result.rb', line 3

def status_code
  @status_code
end

Instance Method Details

#eachObject



11
12
13
14
15
# File 'lib/musix_match/lyrics_search_result.rb', line 11

def each
  @lyrics_list.each do |lyrics|
    yield lyrics
  end
end