class HexaPDF::Type::OutlineItem

def level

Outline item 2 1
|- Sub item 3 2
|- Sub sub item 1 3
|- Sub item 2 2
|- Sub item 1 2
Outline item 1 1
Outline dictionary 0

associated level:
Here is an illustrated example of items contained in a document outline with their

The level of the items in the main outline dictionary, the root level, is 1.

Returns the outline level this item is one.
def level
  count = 0
  temp = self
  count += 1 while (temp = temp[:Parent])
  count
end