Class: WahWah::Ogg::Pages

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/wahwah/ogg/pages.rb

Instance Method Summary collapse

Constructor Details

#initialize(file_io) ⇒ Pages

Returns a new instance of Pages.



8
9
10
# File 'lib/wahwah/ogg/pages.rb', line 8

def initialize(file_io)
  @file_io = file_io
end

Instance Method Details

#eachObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/wahwah/ogg/pages.rb', line 12

def each
  @file_io.rewind

  until @file_io.eof?
    page = Ogg::Page.new(@file_io)
    break unless page.valid?

    yield page
  end
end