Class: Musicbrainz::Artist

Inherits:
Object
  • Object
show all
Defined in:
lib/wrapper/resources/artist.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Artist

Returns a new instance of Artist.



5
6
7
8
9
10
# File 'lib/wrapper/resources/artist.rb', line 5

def initialize args
	args.each do |k, v|
 		instance_variable_set("@#{k.gsub('-', '_')}", v) unless v.nil?
 	end
 	self.child_initializers
end

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def aliases
  @aliases
end

#areaObject

Returns the value of attribute area.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def area
  @area
end

#begin_areaObject

Returns the value of attribute begin_area.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def begin_area
  @begin_area
end

#countryObject

Returns the value of attribute country.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def country
  @country
end

#disambiguationObject

Returns the value of attribute disambiguation.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def disambiguation
  @disambiguation
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def id
  @id
end

#ipisObject

Returns the value of attribute ipis.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def ipis
  @ipis
end

#life_spanObject

Returns the value of attribute life_span.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def life_span
  @life_span
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def name
  @name
end

#sort_nameObject

Returns the value of attribute sort_name.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def sort_name
  @sort_name
end

#tagsObject

Returns the value of attribute tags.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def tags
  @tags
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/wrapper/resources/artist.rb', line 3

def type
  @type
end

Instance Method Details

#aliases_initializeObject



20
21
22
23
24
25
26
# File 'lib/wrapper/resources/artist.rb', line 20

def aliases_initialize
	array = []
	self.aliases.each do |a|
		array << Musicbrainz::Alias.new(a)
	end
	self.aliases = array
end

#child_initializersObject



12
13
14
15
16
17
18
# File 'lib/wrapper/resources/artist.rb', line 12

def child_initializers
	self.area = Musicbrainz::Area.new(self.area) if self.area
	self.begin_area = Musicbrainz::Area.new(self.begin_area) if self.begin_area
	self.life_span = Musicbrainz::Area.new(self.life_span) if self.life_span
	self.aliases_initialize if self.aliases
	self.tags_initialize if self.tags
end

#tags_initializeObject



28
29
30
31
32
33
34
# File 'lib/wrapper/resources/artist.rb', line 28

def tags_initialize
	array = []
	self.tags.each do |a|
		array << Musicbrainz::Tag.new(a)
	end
	self.tags = array
end