Class: Spotify::Music::Importer::CollectionMatch

Inherits:
Object
  • Object
show all
Defined in:
lib/spotify/music/importer/collection_match.rb

Instance Method Summary collapse

Constructor Details

#initialize(collection_record, spotify_match) ⇒ CollectionMatch

Returns a new instance of CollectionMatch.



5
6
7
8
# File 'lib/spotify/music/importer/collection_match.rb', line 5

def initialize(collection_record, spotify_match)
  @collection_record = collection_record
  @spotify_match = spotify_match
end

Instance Method Details

#album_matchObject



18
19
20
# File 'lib/spotify/music/importer/collection_match.rb', line 18

def album_match
  @collection_record.album == @spotify_match.album
end

#full_matchObject



10
11
12
# File 'lib/spotify/music/importer/collection_match.rb', line 10

def full_match
  name_match && album_match
end

#name_matchObject



14
15
16
# File 'lib/spotify/music/importer/collection_match.rb', line 14

def name_match
  @collection_record.name == @spotify_match.name
end