Class: TagLib::Ogg::XiphComment
Overview
Xiph comments (aka VorbisComment), a metadata format used for Ogg Vorbis and other codecs.
A Xiph comment is structured as a set of fields. Each field has a name and a value. Multiple fields with the same name are allowed, so you can also view it as a map from names to a list of values.
Instance Attribute Summary collapse
-
#vendor_id ⇒ String
readonly
Vendor ID of the encoder used.
Attributes inherited from Tag
#album, #artist, #comment, #genre, #title, #track, #year
Instance Method Summary collapse
-
#add_field(name, value, replace = true) ⇒ void
Add a name-value pair to the comment.
-
#contains?(name) ⇒ Boolean
Check if the comment contains a field.
-
#field_count ⇒ Integer
Count the number of fields.
-
#field_list_map ⇒ Hash<String, Array<String>>
Get the contents of the comment as a hash, with the key being a field name String and the value a list of field values for that key.
-
#remove_field ⇒ void
Remove one or more fields.
Methods inherited from Tag
Instance Attribute Details
#vendor_id ⇒ String (readonly)
Returns vendor ID of the encoder used.
73 74 75 |
# File 'docs/taglib/ogg.rb', line 73 def vendor_id @vendor_id end |
Instance Method Details
#add_field(name, value, replace = true) ⇒ void
This method returns an undefined value.
Add a name-value pair to the comment.
22 23 |
# File 'docs/taglib/ogg.rb', line 22 def add_field(name, value, replace=true) end |
#contains?(name) ⇒ Boolean
Check if the comment contains a field.
29 30 |
# File 'docs/taglib/ogg.rb', line 29 def contains?(name) end |
#field_count ⇒ Integer
Count the number of fields.
36 37 |
# File 'docs/taglib/ogg.rb', line 36 def field_count end |
#field_list_map ⇒ Hash<String, Array<String>>
Get the contents of the comment as a hash, with the key being a field name String and the value a list of field values for that key. Example result:
{ 'TITLE' => ["Title"],
'GENRE' => ["Rock", "Pop"] }
Note that the returned hash is read-only. Changing it will have no effect on the comment; use #add_field and #remove_field for that.
52 53 |
# File 'docs/taglib/ogg.rb', line 52 def field_list_map end |
#remove_field(name) ⇒ void #remove_field(name, value) ⇒ void
This method returns an undefined value.
Remove one or more fields.
69 70 |
# File 'docs/taglib/ogg.rb', line 69 def remove_field end |