Class: Musicbrainz::Label

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Label

Returns a new instance of Label.



5
6
7
8
9
10
# File 'lib/wrapper/resources/label.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

#areaObject

Returns the value of attribute area.



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

def area
  @area
end

#countryObject

Returns the value of attribute country.



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

def country
  @country
end

#disambiguationObject

Returns the value of attribute disambiguation.



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

def disambiguation
  @disambiguation
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#ipisObject

Returns the value of attribute ipis.



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

def ipis
  @ipis
end

#label_codeObject

Returns the value of attribute label_code.



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

def label_code
  @label_code
end

#life_spanObject

Returns the value of attribute life_span.



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

def life_span
  @life_span
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#scoreObject

Returns the value of attribute score.



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

def score
  @score
end

#sort_nameObject

Returns the value of attribute sort_name.



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

def sort_name
  @sort_name
end

#tagsObject

Returns the value of attribute tags.



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

def tags
  @tags
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#child_initializersObject



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

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

#tags_initializeObject



18
19
20
21
22
23
24
# File 'lib/wrapper/resources/label.rb', line 18

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