Class: Lllibrary::Track

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/lllibrary/track.rb

Overview

A Track represents an audio file. At minimum, it contains a location field which stores the path to the audio file it represents.

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object

By default, Tracks are sorted by their file path.

TODO: have a way of specifying sorting by parsing a Symbol like :artist_asc_album_asc_track_number_asc



13
14
15
# File 'lib/lllibrary/track.rb', line 13

def <=>(other)
  location <=> other.location
end