Class: MusicBrainz::Model::Alias
- Inherits:
-
Object
- Object
- MusicBrainz::Model::Alias
- 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.
Instance Attribute Summary collapse
-
#name ⇒ Object
The alias name.
-
#script ⇒ Object
The alias script.
-
#type ⇒ Object
The alias type.
Instance Method Summary collapse
-
#initialize(name = nil, type = nil, script = nil) ⇒ Alias
constructor
A new instance of Alias.
- #to_s ⇒ Object
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
#name ⇒ Object
The alias name.
27 28 29 |
# File 'lib/rbrainz/model/alias.rb', line 27 def name @name end |
#script ⇒ Object
The alias script. See Utils#get_script_name.
33 34 35 |
# File 'lib/rbrainz/model/alias.rb', line 33 def script @script end |
#type ⇒ Object
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_s ⇒ Object
41 42 43 |
# File 'lib/rbrainz/model/alias.rb', line 41 def to_s return name.to_s end |