Class: AppleMusicLibrary::Year

Inherits:
TrackCollection show all
Defined in:
lib/apple_music_library/year.rb

Instance Attribute Summary

Attributes inherited from TrackCollection

#name, #tracks

Class Method Summary collapse

Methods inherited from TrackCollection

#add_track, #album_count, all, find_by_name, find_or_create, #initialize, #star_rating, #track_count

Constructor Details

This class inherits a constructor from AppleMusicLibrary::TrackCollection

Class Method Details

.dumpObject



6
7
8
9
10
11
12
13
# File 'lib/apple_music_library/year.rb', line 6

def self.dump
  self.all.sort_by{|y| y.name}.each do |year|
    puts "#{year.name} - #{year.track_count} tracks"
    # year.tracks.each do |track|
    #   puts "\t#{track.name}"
    # end
  end
end

.tokenObject



15
16
17
# File 'lib/apple_music_library/year.rb', line 15

def self.token
  :year
end