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.
72 73 74 |
# File 'lib/epub/content_document/navigation.rb', line 72 def content_document @content_document end |
#href ⇒ Object
Returns the value of attribute href.
74 75 76 |
# File 'lib/epub/content_document/navigation.rb', line 74 def href @href end |
#item ⇒ Object
Returns the value of attribute item.
72 73 74 |
# File 'lib/epub/content_document/navigation.rb', line 72 def item @item end |
#items ⇒ Object
Returns the value of attribute items.
72 73 74 |
# File 'lib/epub/content_document/navigation.rb', line 72 def items @items end |
#text ⇒ Object
Returns the value of attribute text.
72 73 74 |
# File 'lib/epub/content_document/navigation.rb', line 72 def text @text end |
Instance Method Details
#traverse(depth = 0, &block) ⇒ Object
85 86 87 88 89 90 |
# File 'lib/epub/content_document/navigation.rb', line 85 def traverse(depth=0, &block) block.call self, depth items.each do |item| item.traverse depth + 1, &block end end |