Class: ID3Tag::Frames::V2::TextFrame

Inherits:
BasicFrame show all
Defined in:
lib/id3tag/frames/v2/text_frame.rb

Constant Summary collapse

UnsupportedTextEncoding =
Class.new(StandardError)
ENCODING_MAP =
{
  0b0 => Encoding::ISO8859_1,
  0b1 => Encoding::UTF_16,
  0b10 => Encoding::UTF_16BE,
  0b11 => Encoding::UTF_8
}

Constants inherited from BasicFrame

BasicFrame::DECOMPRESSED_SIZE_BYTE_COUNT, BasicFrame::GROUP_BYTE_COUNT

Instance Attribute Summary

Attributes inherited from BasicFrame

#id, #raw_content

Instance Method Summary collapse

Methods inherited from BasicFrame

#compressed?, #data_length_indicator?, #encrypted?, #encryption_id, #final_size, #group_id, #grouped?, #initialize, #inspect, #preserve_on_file_alteration?, #preserve_on_tag_alteration?, #read_additional_info_byte, #read_only?, #unsynchronised?, #usable_content

Constructor Details

This class inherits a constructor from ID3Tag::Frames::V2::BasicFrame

Instance Method Details

#contentObject



13
14
15
# File 'lib/id3tag/frames/v2/text_frame.rb', line 13

def content
  @content ||= StringUtil.cut_at_null_byte(encoded_content)
end

#inspectable_contentObject



17
18
19
# File 'lib/id3tag/frames/v2/text_frame.rb', line 17

def inspectable_content
  content
end