Class: MusicBrainz::Model::Artist

Inherits:
Individual show all
Defined in:
lib/rbrainz/model/artist.rb

Overview

An artist in the MusicBrainz DB.

Artists in MusicBrainz can have a type. Currently, this type can be either Person or Group for which the following URIs are assigned:

Use the TYPE_PERSON and TYPE_GROUP constants for comparison.

See

Individual

See

musicbrainz.org/doc/Artist.

Constant Summary collapse

TYPE_UNKNOWN =

Used if the type of the artist is unknown.

NS_MMD_1 + 'Unknown'
TYPE_PERSON =

This indicates an individual person.

NS_MMD_1 + 'Person'
TYPE_GROUP =

This indicates a group of people that may or may not have a distinctive name.

NS_MMD_1 + 'Group'
ENTITY_TYPE =

See Entity::ENTITY_TYPE.

:artist

Instance Attribute Summary collapse

Attributes inherited from Individual

#aliases, #begin_date, #disambiguation, #end_date, #name, #releases, #sort_name, #type

Attributes included from Rateable

#rating, #user_rating

Attributes inherited from Entity

#id

Instance Method Summary collapse

Methods inherited from Individual

#to_s, #unique_name

Methods included from Taggable

#tags, #user_tags

Methods included from Relateable

#add_relation, #get_relations, #relation_target_types

Methods inherited from Entity

entity_type, #entity_type

Constructor Details

#initialize(id = nil, type = nil, name = nil, sort_name = nil) ⇒ Artist

Returns a new instance of Artist.



43
44
45
46
# File 'lib/rbrainz/model/artist.rb', line 43

def initialize(id=nil, type=nil, name=nil, sort_name=nil)
  super id, type, name, sort_name
  @release_groups = Collection.new
end

Instance Attribute Details

#release_groupsObject (readonly)

A Collection of release groups of this artist.



41
42
43
# File 'lib/rbrainz/model/artist.rb', line 41

def release_groups
  @release_groups
end