Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/rbrainz/core_ext/mbid.rb

Instance Method Summary collapse

Instance Method Details

#to_mbid(entity_type = nil) ⇒ Object

Convert a string into a MusicBrainz::Model::MBID object of the given type.

Raises

MusicBrainz::Model::EntityTypeNotMatchingError



16
17
18
# File 'lib/rbrainz/core_ext/mbid.rb', line 16

def to_mbid(entity_type=nil)
  ::MusicBrainz::Model::MBID.new(self, entity_type)
end