Class: Riff::RiffReader
Instance Method Summary collapse
- #chunks ⇒ Object
-
#initialize(filename) ⇒ RiffReader
constructor
A new instance of RiffReader.
Constructor Details
#initialize(filename) ⇒ RiffReader
Returns a new instance of RiffReader.
55 56 57 |
# File 'lib/ruck/misc/riff.rb', line 55 def initialize(filename) @fn = File.open(filename, "rb") end |
Instance Method Details
#chunks ⇒ Object
59 60 61 62 63 64 65 66 67 68 |
# File 'lib/ruck/misc/riff.rb', line 59 def chunks offset = 0 chunks = [] until @fn.eof? chunks << chunk = RiffReaderChunk.new(@fn, offset) offset += 8 + chunk.size @fn.seek offset + 8 end chunks end |