Classes: Chapter
6 7 8 9 10 11 12 13 14 15
# File 'lib/bookery/factories/chapter_factory.rb', line 6 def create_chapters(book_dir) chapters = [] Dir.entries(book_dir).sort.each do |path| next if path =~ /\.\.?\z/ chapters << Chapter.new(File.join(book_dir, path)) end chapters end