Class: AudioTag::ID3::V2::FrameHeader
- Inherits:
-
Header
show all
- Defined in:
- lib/audio_tag/id3/v2/frame_header.rb
Constant Summary
collapse
- STRUCTURE =
%i[
id id id id
size size size size
flags flags
].freeze
Instance Attribute Summary
Attributes inherited from Header
#bytes
Attributes inherited from StreamReader
#stream
Instance Method Summary
collapse
Methods inherited from Header
#bytes_for
#initialize
#initialize, #read, #read!, #read_byte, #read_byte!, #read_bytes, #read_bytes!, #read_bytes_until, #read_bytes_until!, #read_until, #read_until!
Instance Method Details
#frame_class ⇒ Object
23
24
25
|
# File 'lib/audio_tag/id3/v2/frame_header.rb', line 23
def frame_class
@frame_class ||= frame_type.frame_class
end
|
#frame_size ⇒ Object
15
16
17
|
# File 'lib/audio_tag/id3/v2/frame_header.rb', line 15
def frame_size
@frame_size ||= Synchsafe.parse(*bytes_for(:size))
end
|
#id ⇒ Object
11
12
13
|
# File 'lib/audio_tag/id3/v2/frame_header.rb', line 11
def id
@id ||= bytes_for(:id).pack("c*").to_sym
end
|
#key ⇒ Object
19
20
21
|
# File 'lib/audio_tag/id3/v2/frame_header.rb', line 19
def key
@key ||= frame_type.name
end
|