Class: MusixMatch::TrackSearchResult

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ TrackSearchResult

Returns a new instance of TrackSearchResult.



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

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

Instance Attribute Details

#availableObject (readonly)

Returns the value of attribute available.



3
4
5
# File 'lib/musix_match/track_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/track_search_result.rb', line 3

def execute_time
  @execute_time
end

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/musix_match/track_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/track_search_result.rb', line 3

def status_code
  @status_code
end

#track_listObject (readonly)

Returns the value of attribute track_list.



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

def track_list
  @track_list
end

Instance Method Details

#eachObject



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

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