Module: Caf::Chunk
- Includes:
- Helper
- Defined in:
- lib/caf/chunk.rb,
lib/caf/chunk/base.rb,
lib/caf/chunk/data.rb,
lib/caf/chunk/free.rb,
lib/caf/chunk/helper.rb,
lib/caf/chunk/magic_cookie.rb,
lib/caf/chunk/audio_description.rb
Defined Under Namespace
Modules: Helper Classes: AudioDescription, Base, Data, Free, MagicCookie
Constant Summary
Constants included from Helper
Class Method Summary collapse
Methods included from Helper
read_bytes, read_chars, read_double, read_int
Class Method Details
.available_chunk_types ⇒ Object
5 6 7 |
# File 'lib/caf/chunk.rb', line 5 def self.available_chunk_types @available_chunk_types ||= {} end |
.build(chunk_header) ⇒ Object
9 10 11 12 13 |
# File 'lib/caf/chunk.rb', line 9 def self.build(chunk_header) klass = available_chunk_types[(chunk_header[:chunk_type] || "").downcase] klass = Base if klass.nil? klass.new(chunk_header) end |