Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Track
- attr_accessor :tags,
- :bit_rate,
- :sample_rate,
- :track_number,
- :size,
- :time,
- :artist,
- :comments,
- :composer,
- :filename,
- :genre,
- :grouping,
- :title
- def initialize(song)
- if song.instance_of? Song
- @artist = song.artist
- @bit_rate = song.bit_rate
- @comments = song.comments
- @composer = song.composer
- @filename = song.filename
- @genre = song.genre
- @grouping = song.grouping
- @title = song.title
- @sample_rate = song.sample_rate
- @size = song.size
- @time = song.time
- @track_number = song.track_number
- @tags = song.tags.reject!{ |k| k == :compilation }
- end
- end
- def to_s
- self.inspect
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement