Class: MusicBrainz::Model::Alias

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

Overview

Represents an artist or label alias.

An alias (the alias name) is a different representation of an artist’s or label’s name. This may be a common misspelling or a transliteration (the alias type).

The alias script is interesting mostly for transliterations and indicates which script is used for the alias value. To represent the script, ISO-15924 script codes like ‘Latn’, ‘Cyrl’, or ‘Hebr’ are used.

See

musicbrainz.org/doc/ArtistAlias.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name = nil, type = nil, script = nil) ⇒ Alias

Returns a new instance of Alias.



35
36
37
38
39
# File 'lib/rbrainz/model/alias.rb', line 35

def initialize(name=nil, type=nil, script=nil)
  self.name   = name
  self.type   = type
  self.script = script
end

Instance Attribute Details

#nameObject

The alias name.



27
28
29
# File 'lib/rbrainz/model/alias.rb', line 27

def name
  @name
end

#scriptObject

The alias script. See Utils#get_script_name.



33
34
35
# File 'lib/rbrainz/model/alias.rb', line 33

def script
  @script
end

#typeObject

The alias type. An absolute URI or nil.



30
31
32
# File 'lib/rbrainz/model/alias.rb', line 30

def type
  @type
end

Instance Method Details

#to_sObject



41
42
43
# File 'lib/rbrainz/model/alias.rb', line 41

def to_s
  return name.to_s
end