Class: WahWah::ID3::TextFrameBody

Inherits:
FrameBody
  • Object
show all
Defined in:
lib/wahwah/id3/text_frame_body.rb

Direct Known Subclasses

GenreFrameBody

Constant Summary

Constants inherited from FrameBody

FrameBody::ENCODING_MAPPING, FrameBody::ENCODING_TERMINATOR_SIZE

Instance Attribute Summary

Attributes inherited from FrameBody

#value

Instance Method Summary collapse

Methods inherited from FrameBody

#initialize

Constructor Details

This class inherits a constructor from WahWah::ID3::FrameBody

Instance Method Details

#parseObject

Text frame boby structure:

Text encoding $xx Information <text string according to encoding>



10
11
12
13
# File 'lib/wahwah/id3/text_frame_body.rb', line 10

def parse
  encoding_id, text = @content.unpack("Ca*")
  @value = Helper.encode_to_utf8(text, source_encoding: ENCODING_MAPPING[encoding_id])
end