Method: Playlist#add_track

Defined in:
lib/playlist.rb

#add_track(args) ⇒ Object

Add a track to the playlist

Parameters:

  • args (Track, Hash)

    either a Track object or a Hash of attributes to creatre a new Track



58
59
60
# File 'lib/playlist.rb', line 58

def add_track(args)
  @tracks << (args.is_a?(Track) ? args : Track.new(args))
end