Class: Musicbrainz::Artist
- Inherits:
-
Object
- Object
- Musicbrainz::Artist
- Defined in:
- lib/wrapper/resources/artist.rb
Instance Attribute Summary collapse
-
#aliases ⇒ Object
Returns the value of attribute aliases.
-
#area ⇒ Object
Returns the value of attribute area.
-
#begin_area ⇒ Object
Returns the value of attribute begin_area.
-
#country ⇒ Object
Returns the value of attribute country.
-
#disambiguation ⇒ Object
Returns the value of attribute disambiguation.
-
#id ⇒ Object
Returns the value of attribute id.
-
#ipis ⇒ Object
Returns the value of attribute ipis.
-
#life_span ⇒ Object
Returns the value of attribute life_span.
-
#name ⇒ Object
Returns the value of attribute name.
-
#sort_name ⇒ Object
Returns the value of attribute sort_name.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #aliases_initialize ⇒ Object
- #child_initializers ⇒ Object
-
#initialize(args) ⇒ Artist
constructor
A new instance of Artist.
- #tags_initialize ⇒ Object
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
#aliases ⇒ Object
Returns the value of attribute aliases.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def aliases @aliases end |
#area ⇒ Object
Returns the value of attribute area.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def area @area end |
#begin_area ⇒ Object
Returns the value of attribute begin_area.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def begin_area @begin_area end |
#country ⇒ Object
Returns the value of attribute country.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def country @country end |
#disambiguation ⇒ Object
Returns the value of attribute disambiguation.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def disambiguation @disambiguation end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def id @id end |
#ipis ⇒ Object
Returns the value of attribute ipis.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def ipis @ipis end |
#life_span ⇒ Object
Returns the value of attribute life_span.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def life_span @life_span end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def name @name end |
#sort_name ⇒ Object
Returns the value of attribute sort_name.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def sort_name @sort_name end |
#tags ⇒ Object
Returns the value of attribute tags.
3 4 5 |
# File 'lib/wrapper/resources/artist.rb', line 3 def @tags end |
#type ⇒ Object
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_initialize ⇒ Object
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_initializers ⇒ Object
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. if self. end |
#tags_initialize ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/wrapper/resources/artist.rb', line 28 def array = [] self..each do |a| array << Musicbrainz::Tag.new(a) end self. = array end |