Class: MusicBrainz::Model::Tag
- Inherits:
-
Object
- Object
- MusicBrainz::Model::Tag
- 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.
Instance Attribute Summary collapse
-
#count ⇒ Object
The tag count indicating how often the tag was used for the entity it’s assigned to.
-
#text ⇒ Object
The tag text.
Instance Method Summary collapse
-
#initialize(text = nil, count = nil) ⇒ Tag
constructor
A new instance of Tag.
-
#to_s ⇒ Object
Convert this tag into a String.
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
#count ⇒ Object
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 |
#text ⇒ Object
The tag text.
20 21 22 |
# File 'lib/rbrainz/model/tag.rb', line 20 def text @text end |
Instance Method Details
#to_s ⇒ Object
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 |