summaryrefslogblamecommitdiffstats
path: root/lib/song.rb
blob: 93172f2cccd49aa2cdccf94facf6ab9167847e5b (plain) (tree)
1
2
3
4
5
6
7
8
9
          
                                                                   



                            


                                                  

                            



                        
   
class Song
  attr_reader :title, :time, :isrc, :composers, :performers, :notes

  def initialize(params)
    @title = params['title']
    @time = params['time']
    @isrc = params['isrc']
    @composers = params['composers'].split("\n")
    @performers = params['performers'].split("\n")
    @notes = params['notes']
  end

  def to_s
    "#{title} (#{time})"
  end
end