Class: Track
- Inherits:
-
Object
- Object
- Track
- Defined in:
- lib/track.rb
Constant Summary collapse
- ATTRIBUTES =
[:track_id, :name, :artist, :album, :genre, :kind, :size, :total_time, :track_number, :track_count, :year, :date_modified, :date_added, :bit_rate, :sample_rate, :play_count, :play_date, :play_date_utc, :rating, :album_rating, :artwork_count, :persistent_id, :track_type, :location]
Instance Method Summary collapse
-
#initialize(hash) ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize(hash) ⇒ Track
Returns a new instance of Track.
6 7 8 9 10 |
# File 'lib/track.rb', line 6 def initialize(hash) ATTRIBUTES.each do |attribute| self.send("#{attribute}=", (hash[attribute] || "")) end end |