Class: MusicBrainz::Model::Tag

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

Overview

Represents a tag assigned to an entity.

Tags are arbitrary labels assigned to entities by the users of MusicBrainz.

See

wiki.musicbrainz.org/FolksonomyTagging

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text = nil, count = nil) ⇒ Tag

Returns a new instance of Tag.



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

def initialize(text=nil, count=nil)
  @text  = text
  @count = count
end

Instance Attribute Details

#countObject

The tag count indicating how often the tag was used for the entity it’s assigned to.



24
25
26
# File 'lib/rbrainz/model/tag.rb', line 24

def count
  @count
end

#textObject

The tag text.



20
21
22
# File 'lib/rbrainz/model/tag.rb', line 20

def text
  @text
end

Instance Method Details

#to_sObject

Convert this tag into a String. Will return text.



32
33
34
# File 'lib/rbrainz/model/tag.rb', line 32

def to_s
  return text.to_s
end