Class: WahWah::Mp3Tag

Inherits:
Tag
  • Object
show all
Extended by:
Forwardable, TagDelegate
Defined in:
lib/wahwah/mp3_tag.rb

Constant Summary

Constants inherited from Tag

Tag::INSPECT_ATTRIBUTES, Tag::INTEGER_ATTRIBUTES

Instance Attribute Summary

Attributes inherited from Tag

#album, #albumartist, #artist, #bit_depth, #bitrate, #comments, #composer, #disc, #disc_total, #duration, #file_size, #genre, #lyrics, #sample_rate, #title, #track, #track_total, #year

Instance Method Summary collapse

Methods included from TagDelegate

tag_delegate

Methods inherited from Tag

#images, #initialize, #inspect

Constructor Details

This class inherits a constructor from WahWah::Tag

Instance Method Details

#id3_versionObject



37
38
39
# File 'lib/wahwah/mp3_tag.rb', line 37

def id3_version
  @id3_tag&.version
end

#id3v2?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/wahwah/mp3_tag.rb', line 29

def id3v2?
  @id3_tag.instance_of? ID3::V2
end

#invalid_id3?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/wahwah/mp3_tag.rb', line 33

def invalid_id3?
  @id3_tag.nil?
end

#is_vbr?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/wahwah/mp3_tag.rb', line 41

def is_vbr?
  mpeg_frame_header.valid? && (xing_header.valid? || vbri_header.valid?)
end