Class: FFSplitter::ChapterList
- Inherits:
-
Object
- Object
- FFSplitter::ChapterList
- Includes:
- Enumerable
- Defined in:
- lib/ffsplitter/chapter.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.
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 |