class EPUB::ContentDocument::Navigation

Attributes

navigations[RW]

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/epub/content_document/navigation.rb, line 10
def initialize
  @navigations = []
  @hidden = false
  @parent = nil
  super
end

Public Instance Methods

contents() click to toggle source

Enumerator version of toc

# File lib/epub/content_document/navigation.rb, line 30
def contents
  enum_for(:each_content).to_a
end
each_content() { |content| ... } click to toggle source

iterator for toc

# File lib/epub/content_document/navigation.rb, line 43
def each_content
  toc.traverse do |content, _|
    yield content
  end
end
each_landmark() click to toggle source

iterator for landmark

# File lib/epub/content_document/navigation.rb, line 55
def each_landmark
  raise NotImplementedError
end
each_page() click to toggle source

iterator for page_list

# File lib/epub/content_document/navigation.rb, line 50
def each_page
  raise NotImplementedError
end
landmarks() click to toggle source
# File lib/epub/content_document/navigation.rb, line 25
def landmarks
  navigations.find(&:landmarks?)
end
navigation() click to toggle source
page_list() click to toggle source
# File lib/epub/content_document/navigation.rb, line 21
def page_list
  navigations.find(&:page_list?)
end
pages() click to toggle source

Enumerator version of page_list

Usage: navigation.enum_for(:pages)
# File lib/epub/content_document/navigation.rb, line 36
def pages
  raise NotImplementedError
end
toc() click to toggle source
# File lib/epub/content_document/navigation.rb, line 17
def toc
  navigations.find(&:toc?)
end