class Playlist::Contributor
Data model class that represents a contributor to a track. A Contrutor can be a person, or a organisation (such an band, choir or orchestra).
Attributes
identifiers[R]
Get a hash of identifier for this Contributor
Identifiers can either be Strings or URIs @return [Hash] an hash of identifiers
name[RW]
The name of the contributor @return [String]
role[RW]
The role of the contribrition to the track
Recommended values for role:
:performer :composer :arranger :lyricist
@return [Symbol]
Public Class Methods
new(attr = nil) { |self| ... }
click to toggle source
Create a new Contributor
# File lib/playlist/contributor.rb, line 25 def initialize(attr = nil) @identifiers = {} if attr.is_a?(Hash) attr.each_pair do |key, value| send("#{key}=", value) end elsif attr.is_a?(String) self.name = attr end yield(self) if block_given? end