Class: FFSplitter::ChapterList
- Inherits:
-
Object
- Object
- FFSplitter::ChapterList
- Includes:
- Enumerable
- Defined in:
- lib/ffsplitter/chapter_list.rb
Instance Method Summary collapse
- #add(chapter) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize ⇒ ChapterList
constructor
A new instance of ChapterList.
Constructor Details
#initialize ⇒ ChapterList
Returns a new instance of ChapterList.
6 7 8 |
# File 'lib/ffsplitter/chapter_list.rb', line 6 def initialize @chapters = [] end |
Instance Method Details
#add(chapter) ⇒ Object
14 15 16 17 |
# File 'lib/ffsplitter/chapter_list.rb', line 14 def add(chapter) chapter.list = self @chapters << chapter end |
#each(&block) ⇒ Object
10 11 12 |
# File 'lib/ffsplitter/chapter_list.rb', line 10 def each(&block) @chapters.each { |c| yield c } end |