Class: Musicbrainz::Release
- Inherits:
-
Object
- Object
- Musicbrainz::Release
- Defined in:
- lib/wrapper/resources/release.rb
Instance Attribute Summary collapse
-
#area ⇒ Object
Returns the value of attribute area.
-
#artist_credit ⇒ Object
Returns the value of attribute artist_credit.
-
#asin ⇒ Object
Returns the value of attribute asin.
-
#barcode ⇒ Object
Returns the value of attribute barcode.
-
#count ⇒ Object
Returns the value of attribute count.
-
#country ⇒ Object
Returns the value of attribute country.
-
#cover_art_archive ⇒ Object
Returns the value of attribute cover_art_archive.
-
#date ⇒ Object
Returns the value of attribute date.
-
#id ⇒ Object
Returns the value of attribute id.
-
#label_info ⇒ Object
Returns the value of attribute label_info.
-
#media ⇒ Object
Returns the value of attribute media.
-
#packshot ⇒ Object
Returns the value of attribute packshot.
-
#quality ⇒ Object
Returns the value of attribute quality.
-
#relations ⇒ Object
Returns the value of attribute relations.
-
#release_events ⇒ Object
Returns the value of attribute release_events.
-
#release_group ⇒ Object
Returns the value of attribute release_group.
-
#score ⇒ Object
Returns the value of attribute score.
-
#status ⇒ Object
Returns the value of attribute status.
-
#text_representation ⇒ Object
Returns the value of attribute text_representation.
-
#title ⇒ Object
Returns the value of attribute title.
-
#track_count ⇒ Object
Returns the value of attribute track_count.
Instance Method Summary collapse
- #artists_initialize ⇒ Object
- #child_initializers ⇒ Object
-
#initialize(args) ⇒ Release
constructor
A new instance of Release.
- #label_info_initialize ⇒ Object
- #media_initialize ⇒ Object
- #relations_initialize ⇒ Object
- #release_events_initialize ⇒ Object
Constructor Details
#initialize(args) ⇒ Release
Returns a new instance of Release.
5 6 7 8 9 10 |
# File 'lib/wrapper/resources/release.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
#area ⇒ Object
Returns the value of attribute area.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def area @area end |
#artist_credit ⇒ Object
Returns the value of attribute artist_credit.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def artist_credit @artist_credit end |
#asin ⇒ Object
Returns the value of attribute asin.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def asin @asin end |
#barcode ⇒ Object
Returns the value of attribute barcode.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def @barcode end |
#count ⇒ Object
Returns the value of attribute count.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def count @count end |
#country ⇒ Object
Returns the value of attribute country.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def country @country end |
#cover_art_archive ⇒ Object
Returns the value of attribute cover_art_archive.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def cover_art_archive @cover_art_archive end |
#date ⇒ Object
Returns the value of attribute date.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def date @date end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def id @id end |
#label_info ⇒ Object
Returns the value of attribute label_info.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def label_info @label_info end |
#media ⇒ Object
Returns the value of attribute media.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def media @media end |
#packshot ⇒ Object
Returns the value of attribute packshot.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def packshot @packshot end |
#quality ⇒ Object
Returns the value of attribute quality.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def quality @quality end |
#relations ⇒ Object
Returns the value of attribute relations.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def relations @relations end |
#release_events ⇒ Object
Returns the value of attribute release_events.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def release_events @release_events end |
#release_group ⇒ Object
Returns the value of attribute release_group.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def release_group @release_group end |
#score ⇒ Object
Returns the value of attribute score.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def score @score end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def status @status end |
#text_representation ⇒ Object
Returns the value of attribute text_representation.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def text_representation @text_representation end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def title @title end |
#track_count ⇒ Object
Returns the value of attribute track_count.
3 4 5 |
# File 'lib/wrapper/resources/release.rb', line 3 def track_count @track_count end |
Instance Method Details
#artists_initialize ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/wrapper/resources/release.rb', line 24 def artists_initialize array = [] self.artist_credit.each do |a| array << Musicbrainz::Artist.new(a["artist"]) if a["artist"] end self.artist_credit = array end |
#child_initializers ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/wrapper/resources/release.rb', line 12 def child_initializers self.area = Musicbrainz::Area.new(self.area) if self.area self.text_representation = Musicbrainz::TextRepresentation.new(self.text_representation) if self.text_representation self.release_group = Musicbrainz::ReleaseGroup.new(self.release_group) if self.release_group self.cover_art_archive = Musicbrainz::CoverArtArchive.new(self.cover_art_archive) if self.cover_art_archive self.artists_initialize if self.artist_credit self.media_initialize if self.media self.label_info_initialize if self.label_info self.release_events_initialize if self.release_events self.relations_initialize if self.relations end |
#label_info_initialize ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/wrapper/resources/release.rb', line 40 def label_info_initialize array = [] self.label_info.each do |a| array << Musicbrainz::LabelInfo.new(a) end self.label_info = array end |
#media_initialize ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/wrapper/resources/release.rb', line 32 def media_initialize array = [] self.media.each do |a| array << Musicbrainz::Media.new(a) end self.media = array end |
#relations_initialize ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/wrapper/resources/release.rb', line 56 def relations_initialize array = [] self.relations.each do |a| array << Musicbrainz::Relation.new(a) end self.relations = array end |
#release_events_initialize ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/wrapper/resources/release.rb', line 48 def release_events_initialize array = [] self.release_events.each do |a| array << Musicbrainz::ReleaseEvent.new(a) end self.release_events = array end |