Class: MusixMatch::TrackSearchResult
- Inherits:
-
Object
- Object
- MusixMatch::TrackSearchResult
- Defined in:
- lib/musix_match/track_search_result.rb
Instance Attribute Summary collapse
-
#available ⇒ Object
readonly
Returns the value of attribute available.
-
#execute_time ⇒ Object
readonly
Returns the value of attribute execute_time.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#track_list ⇒ Object
readonly
Returns the value of attribute track_list.
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(response) ⇒ TrackSearchResult
constructor
A new instance of TrackSearchResult.
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
#available ⇒ Object (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_time ⇒ Object (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 |
#response ⇒ Object (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_code ⇒ Object (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_list ⇒ Object (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
#each ⇒ Object
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 |