Commit bb369443 authored by KitaitiMakoto's avatar KitaitiMakoto

Show class of yielded arguments

parent c987fbb7
......@@ -9,6 +9,8 @@ Example to show tree of Table of Contents:
toc = nav.toc # => EPUB::ContentDocument::Navigation::Navigation
toc_tree = ''
toc.traverse do |item, depth|
item # => EPUB::ContentDocument::Navigation::Item
depth # => Integer
toc_tree << "#{' ' * depth * 2}#{item.text}\n"
end
puts toc_tree
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment