Class: ID3Tag::Frames::V2::CommentsFrame

Inherits:
TextFrame show all
Defined in:
lib/id3tag/frames/v2/comments_frame.rb

Direct Known Subclasses

UnsychronizedTranscriptionFrame

Constant Summary collapse

LANGUAGE_BYTE_COUNT =
3

Constants inherited from TextFrame

TextFrame::ENCODING_MAP, TextFrame::UnsupportedTextEncoding

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



20
21
22
# File 'lib/id3tag/frames/v2/comments_frame.rb', line 20

def content
  text
end

#descriptionObject



12
13
14
# File 'lib/id3tag/frames/v2/comments_frame.rb', line 12

def description
  @desciption ||= parts.first
end

#inspectable_contentObject



24
25
26
# File 'lib/id3tag/frames/v2/comments_frame.rb', line 24

def inspectable_content
  content
end

#languageObject



8
9
10
# File 'lib/id3tag/frames/v2/comments_frame.rb', line 8

def language
  @language ||= get_language
end

#textObject



16
17
18
# File 'lib/id3tag/frames/v2/comments_frame.rb', line 16

def text
  @text ||= StringUtil.cut_at_null_byte(parts.last)
end