Method: Playlist#initialize
- Defined in:
- lib/playlist.rb
#initialize(attr = {}) {|_self| ... } ⇒ Playlist
Create a new Playlist
45 46 47 48 49 50 51 52 53 |
# File 'lib/playlist.rb', line 45 def initialize(attr = {}) @tracks = [] @identifiers = {} attr.each_pair do |key, value| send("#{key}=", value) end yield(self) if block_given? end |