Module: EPUB::Book::Features

Included in:
EPUB::Book
Defined in:
lib/epub/book/features.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#epub_fileObject

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_imageObject

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_contentEnumerator

Overloads:



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_spineEnumerator

Overloads:



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

Raises:

  • (NotImplementedError)


46
47
48
# File 'lib/epub/book/features.rb', line 46

def each_page_on_toc(&blk)
  raise NotImplementedError
end

#other_navigationObject

Raises:

  • (NotImplementedError)


64
65
66
# File 'lib/epub/book/features.rb', line 64

def other_navigation
  raise NotImplementedError
end

#resourcesArray<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_pathObject

Syntax sugar



74
75
76
# File 'lib/epub/book/features.rb', line 74

def rootfile_path
  ocf.container.rootfile.full_path.to_s
end