Module: EPUB::Book::Features
- Included in:
- EPUB::Book
- Defined in:
- lib/epub/book/features.rb
Instance Attribute Summary collapse
-
#epub_file ⇒ Object
Returns the value of attribute epub_file.
Instance Method Summary collapse
-
#cover_image ⇒ Object
Syntax sugar.
- #each_content(&blk) ⇒ Object
- #each_page_on_spine(&blk) ⇒ Object
- #each_page_on_toc(&blk) ⇒ Object
- #other_navigation ⇒ Object
-
#resources ⇒ Array<Publication::Package::Manifest::Item>
All Publication::Package::Manifest::Items in EPUB package.
-
#rootfile_path ⇒ Object
Syntax sugar.
Instance Attribute Details
#epub_file ⇒ Object
Returns the value of attribute epub_file.
6 7 8 |
# File 'lib/epub/book/features.rb', line 6 def epub_file @epub_file end |
Instance Method Details
#cover_image ⇒ Object
Syntax sugar
79 80 81 |
# File 'lib/epub/book/features.rb', line 79 def cover_image manifest.cover_image end |
#each_content {|item| ... } ⇒ Object #each_content ⇒ Enumerator
55 56 57 58 59 60 61 62 |
# File 'lib/epub/book/features.rb', line 55 def each_content(&blk) enum = manifest.items if block_given? enum.each &blk else enum.to_enum end end |
#each_page_on_spine {|item| ... } ⇒ Object #each_page_on_spine ⇒ Enumerator
37 38 39 40 41 42 43 44 |
# File 'lib/epub/book/features.rb', line 37 def each_page_on_spine(&blk) enum = package.spine.items if block_given? enum.each &blk else enum end end |
#each_page_on_toc(&blk) ⇒ Object
46 47 48 |
# File 'lib/epub/book/features.rb', line 46 def each_page_on_toc(&blk) raise NotImplementedError end |
#other_navigation ⇒ Object
64 65 66 |
# File 'lib/epub/book/features.rb', line 64 def raise NotImplementedError end |
#resources ⇒ Array<Publication::Package::Manifest::Item>
Returns All Publication::Package::Manifest::Items in EPUB package.
69 70 71 |
# File 'lib/epub/book/features.rb', line 69 def resources manifest.items end |
#rootfile_path ⇒ Object
Syntax sugar
74 75 76 |
# File 'lib/epub/book/features.rb', line 74 def rootfile_path ocf.container.rootfile.full_path.to_s end |