Class: EPUB::ContentDocument::Navigation
- Defined in:
- lib/epub/content_document/navigation.rb
Defined Under Namespace
Modules: Hidable Classes: Item, ItemList, Navigation
Instance Attribute Summary collapse
-
#navigations ⇒ Object
Returns the value of attribute navigations.
Attributes inherited from XHTML
Instance Method Summary collapse
-
#contents ⇒ Object
Enumerator version of toc Usage: nagivation.enum_for(:contents).
-
#each_content ⇒ Object
iterator for #toc.
-
#each_landmark ⇒ Object
iterator for #landmark.
-
#each_page ⇒ Object
iterator for #page_list.
-
#initialize ⇒ Navigation
constructor
A new instance of Navigation.
- #landmarks ⇒ Object
- #navigation ⇒ Object
- #page_list ⇒ Object
-
#pages ⇒ Object
Enumerator version of page_list Usage: navigation.enum_for(:pages).
- #toc ⇒ Object
Methods inherited from XHTML
#nokogiri, #read, #rexml, #title, #top_level?
Constructor Details
#initialize ⇒ Navigation
Returns a new instance of Navigation.
6 7 8 9 |
# File 'lib/epub/content_document/navigation.rb', line 6 def initialize @navigations = [] super end |
Instance Attribute Details
#navigations ⇒ Object
Returns the value of attribute navigations.
4 5 6 |
# File 'lib/epub/content_document/navigation.rb', line 4 def @navigations end |
Instance Method Details
#contents ⇒ Object
Enumerator version of toc
Usage: nagivation.enum_for(:contents)
25 26 |
# File 'lib/epub/content_document/navigation.rb', line 25 def contents end |
#each_content ⇒ Object
iterator for #toc
34 35 |
# File 'lib/epub/content_document/navigation.rb', line 34 def each_content end |
#each_landmark ⇒ Object
iterator for #landmark
42 43 |
# File 'lib/epub/content_document/navigation.rb', line 42 def each_landmark end |
#each_page ⇒ Object
iterator for #page_list
38 39 |
# File 'lib/epub/content_document/navigation.rb', line 38 def each_page end |
#landmarks ⇒ Object
19 20 21 |
# File 'lib/epub/content_document/navigation.rb', line 19 def landmarks .selector {|nav| nav.type == Navigation::Type::LANDMARKS}.first end |
#navigation ⇒ Object
45 46 47 |
# File 'lib/epub/content_document/navigation.rb', line 45 def .first end |
#page_list ⇒ Object
15 16 17 |
# File 'lib/epub/content_document/navigation.rb', line 15 def page_list .selector {|nav| nav.type == Nagivation::Type::PAGE_LIST}.first end |
#pages ⇒ Object
Enumerator version of page_list
Usage: navigation.enum_for(:pages)
30 31 |
# File 'lib/epub/content_document/navigation.rb', line 30 def pages end |
#toc ⇒ Object
11 12 13 |
# File 'lib/epub/content_document/navigation.rb', line 11 def toc .selector {|nav| nav.type == Navigation::Type::TOC}.first end |