Method: EPUB::Search::Database#books

Defined in:
lib/epub/search/database.rb

#books(path = false) ⇒ Object



113
114
115
116
117
118
119
120
121
# File 'lib/epub/search/database.rb', line 113

def books(path=false)
  open do
    pages.group_by(&:location).collect {|location, records|
      result = records.first.book_title
      result << " - #{location}" if path
      result
    }
  end
end