Class: MusicBrainz::Model::Artist
- Inherits:
-
Individual
- Object
- Entity
- Individual
- MusicBrainz::Model::Artist
- 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
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
-
#release_groups ⇒ Object
readonly
A Collection of release groups of this artist.
Attributes inherited from Individual
#aliases, #begin_date, #disambiguation, #end_date, #name, #releases, #sort_name, #type
Attributes included from Rateable
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(id = nil, type = nil, name = nil, sort_name = nil) ⇒ Artist
constructor
A new instance of Artist.
Methods inherited from Individual
Methods included from Taggable
Methods included from Relateable
#add_relation, #get_relations, #relation_target_types
Methods inherited from Entity
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_groups ⇒ Object (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 |