Class: FFSplitter::ChapterList

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/ffsplitter/chapter.rb

Instance Method Summary collapse

Constructor Details

#initializeChapterList

Returns a new instance of ChapterList.



8
9
10
# File 'lib/ffsplitter/chapter.rb', line 8

def initialize
  @chapters = []
end

Instance Method Details

#add(chapter) ⇒ Object



16
17
18
19
# File 'lib/ffsplitter/chapter.rb', line 16

def add(chapter)
  chapter.list = self
  @chapters << chapter
end

#each(&block) ⇒ Object



12
13
14
# File 'lib/ffsplitter/chapter.rb', line 12

def each(&block)
  @chapters.each { |c| yield c }
end