Class: AudioTag::ID3::Header
- Inherits:
-
StreamSection
- Object
- StreamReader
- StreamSection
- AudioTag::ID3::Header
- Defined in:
- lib/audio_tag/id3/header.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#bytes ⇒ Object
readonly
Returns the value of attribute bytes.
Attributes inherited from StreamReader
Instance Method Summary collapse
Methods inherited from StreamSection
Methods inherited from StreamReader
#initialize, #read, #read!, #read_byte, #read_byte!, #read_bytes, #read_bytes!, #read_bytes_until, #read_bytes_until!, #read_until, #read_until!
Constructor Details
This class inherits a constructor from AudioTag::ID3::StreamSection
Instance Attribute Details
#bytes ⇒ Object (readonly)
Returns the value of attribute bytes.
4 5 6 |
# File 'lib/audio_tag/id3/header.rb', line 4 def bytes @bytes end |
Instance Method Details
#bytes_for(key) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/audio_tag/id3/header.rb', line 6 def bytes_for(key) first = structure.index(key) || raise("invalid key :#{key}") last = structure.rindex(key) bytes[first..last] || raise end |