class AudioBookCreator::BookCreator

Attributes

binder[RW]

spoken_chapter[], book_def -> book force, channels, max_hours, bit_rate, sample_rate

editor[RW]

page_def || pages -> chapters

speaker[RW]

spoken_def, base_dir || chapter[] -> spoken_chapters[]

spider[RW]

config: web (factory), page_def.link_path || outstanding[] -> pages[]

decision (!invalid, !outstanding, !visited)

Public Class Methods

new(spider, editor, speaker, binder) click to toggle source
# File lib/audio_book_creator/book_creator.rb, line 15
def initialize(spider, editor, speaker, binder)
  @spider  = spider
  @editor  = editor
  @speaker = speaker
  @binder  = binder
end

Public Instance Methods

create(outstanding) click to toggle source
# File lib/audio_book_creator/book_creator.rb, line 22
def create(outstanding)
  speaker.make_directory_structure
  binder.create(
    editor.parse(
      spider.run(outstanding)
    ).map { |chapter| speaker.say(chapter) }
  )
end