Sha256: 4a6343386a34cf8c3032bbaf17f0dfda24348fd07df8ad44f8cfd065a3e864d3
Contents?: true
Size: 740 Bytes
Versions: 2
Compression:
Stored size: 740 Bytes
Contents
module PDFium # A list of bookmarks for a Document or a Bookmark class BookmarkList include Enumerable # Not used directly, but called from Document#bookmarks def initialize(initial) @first=initial end # Calls block once for each bookmark that exists at the current level # Since bookmarks form a tree, each bookmark may have one or more children def each bookmark = @first while bookmark yield bookmark bookmark = bookmark.next_sibling end end # True if no bookmarks exist, false if at least one is present def empty? @first.nil? end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pdfium-0.0.2 | lib/pdfium/bookmark_list.rb |
pdfium-0.0.1 | lib/pdfium/bookmark_list.rb |