Class: EPUB::ContentDocument::Navigation::Item
- Inherits:
-
Object
- Object
- EPUB::ContentDocument::Navigation::Item
- Includes:
- Hidable
- Defined in:
- lib/epub/content_document/navigation.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#content_document ⇒ Object
Returns the value of attribute content_document.
-
#href ⇒ Object
Returns the value of attribute href.
-
#item ⇒ Object
Returns the value of attribute item.
-
#items ⇒ Object
Returns the value of attribute items.
-
#text ⇒ Object
Returns the value of attribute text.
Attributes included from Hidable
Instance Method Summary collapse
-
#initialize ⇒ Item
constructor
A new instance of Item.
- #traverse(depth = 0, &block) ⇒ Object
Methods included from Hidable
Constructor Details
Instance Attribute Details
#content_document ⇒ Object
Returns the value of attribute content_document.
74 75 76 |
# File 'lib/epub/content_document/navigation.rb', line 74 def content_document @content_document end |
#href ⇒ Object
Returns the value of attribute href.
76 77 78 |
# File 'lib/epub/content_document/navigation.rb', line 76 def href @href end |
#item ⇒ Object
Returns the value of attribute item.
74 75 76 |
# File 'lib/epub/content_document/navigation.rb', line 74 def item @item end |
#items ⇒ Object
Returns the value of attribute items.
74 75 76 |
# File 'lib/epub/content_document/navigation.rb', line 74 def items @items end |
#text ⇒ Object
Returns the value of attribute text.
74 75 76 |
# File 'lib/epub/content_document/navigation.rb', line 74 def text @text end |
Instance Method Details
#traverse(depth = 0, &block) ⇒ Object
87 88 89 90 91 92 |
# File 'lib/epub/content_document/navigation.rb', line 87 def traverse(depth=0, &block) block.call self, depth items.each do |item| item.traverse depth + 1, &block end end |