Class: MusicBrainz::Model::ReleaseEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/rbrainz/model/release_event.rb

Overview

A release event in the MusicBrainz DB indicating where and when a release took place.

All country codes used must be valid ISO-3166 country codes (i.e. ‘DE’, ‘UK’ or ‘FR’). The dates are instances of IncompleteDate or strings which must have the format ‘YYYY’, ‘YYYY-MM’ or ‘YYYY-MM-DD’.

The format of the release medium is a URI that can be compared to the constants on this class (FORMAT_CD, FORMAT_DVD and others).

See

musicbrainz.org/doc/ReleaseEvent.

Constant Summary collapse

FORMAT_CD =
NS_MMD_1 + 'CD'
FORMAT_DVD =
NS_MMD_1 + 'DVD'
FORMAT_SACD =
NS_MMD_1 + 'SACD'
FORMAT_DUALDISC =
NS_MMD_1 + 'DualDisc'
FORMAT_LASERDISC =
NS_MMD_1 + 'LaserDisc'
FORMAT_MINIDISC =
NS_MMD_1 + 'MiniDisc'
FORMAT_VINYL =
NS_MMD_1 + 'Vinyl'
FORMAT_CASSETTE =
NS_MMD_1 + 'Cassette'
FORMAT_CARTRIDGE =
NS_MMD_1 + 'Cartridge'
FORMAT_REEL_TO_REEL =
NS_MMD_1 + 'ReelToReel'
FORMAT_DAT =
NS_MMD_1 + 'DAT'
FORMAT_DIGITAL =
NS_MMD_1 + 'Digital'
FORMAT_WAX_CYLINDER =
NS_MMD_1 + 'WaxCylinder'
FORMAT_PIANO_ROLL =
NS_MMD_1 + 'PianoRoll'
FORMAT_DCC =
NS_MMD_1 + 'DCC'
FORMAT_OTHER =
NS_MMD_1 + 'Other'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(country = nil, date = nil) ⇒ ReleaseEvent



69
70
71
72
# File 'lib/rbrainz/model/release_event.rb', line 69

def initialize(country=nil, date=nil)
  self.country = country
  self.date    = date
end

Instance Attribute Details

#barcodeObject

The barcode as it is printed on the release.



58
59
60
# File 'lib/rbrainz/model/release_event.rb', line 58

def barcode
  @barcode
end

#catalog_numberObject

The catalog number given to the release by the label.



55
56
57
# File 'lib/rbrainz/model/release_event.rb', line 55

def catalog_number
  @catalog_number
end

#countryObject

The country in which an album was released. A string containing a ISO 3166 country code like ‘GB’, ‘US’ or ‘DE’.

See

Utils#get_country_name

See

musicbrainz.org/doc/ReleaseCountry



52
53
54
# File 'lib/rbrainz/model/release_event.rb', line 52

def country
  @country
end

#dateObject

The release date. An instance of IncompleteDate.



64
65
66
# File 'lib/rbrainz/model/release_event.rb', line 64

def date
  @date
end

#formatObject

The media format of the release (e.g. CD or Vinyl).



67
68
69
# File 'lib/rbrainz/model/release_event.rb', line 67

def format
  @format
end

#labelObject

The label issuing the release.



61
62
63
# File 'lib/rbrainz/model/release_event.rb', line 61

def label
  @label
end