Class: TagLib::AudioTag

Inherits:
Data
  • Object
show all
Defined in:
lib/taglib_simple/audio_tag.rb

Overview

Represents a normalised subset of tags

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#albumString (readonly)



# File 'lib/taglib_simple/audio_tag.rb', line 15


#artistString (readonly)



# File 'lib/taglib_simple/audio_tag.rb', line 12


#genreString (readonly)



# File 'lib/taglib_simple/audio_tag.rb', line 18


#titleString (readonly)



# File 'lib/taglib_simple/audio_tag.rb', line 9


#trackInteger (readonly)



# File 'lib/taglib_simple/audio_tag.rb', line 24


#yearInteger (readonly)



# File 'lib/taglib_simple/audio_tag.rb', line 21


Class Method Details

.read(filename) ⇒ AudioTag



33
34
35
# File 'lib/taglib_simple/audio_tag.rb', line 33

def read(filename)
  MediaFile.open(filename, all: false, tag: true, &:tag)
end

Instance Method Details

#to_hHash<Symbol, <String,Integer>>



62
63
64
65
# File 'lib/taglib_simple/audio_tag.rb', line 62

def to_h
  # do not expose nil entries
  super.compact
end