Method: Mangos::ResortPagesProcessor#update

Defined in:
lib/mangos/resort_pages_processor.rb

#update(path, book) ⇒ Object



10
11
12
13
14
15
# File 'lib/mangos/resort_pages_processor.rb', line 10

def update(path, book)
  page_paths = Mangos::PagesInflater.new(book.page_paths).inflate
  sorted_page_paths = Naturalsorter::Sorter.sort(page_paths, true)
  book.page_paths = Mangos::PagesDeflater.new(sorted_page_paths).deflate
  true
end