class Glyph::Header
This class is used to model bookmark headers
Attributes
level[R]
Public Class Methods
new(hash)
click to toggle source
Initializes the bookmark from a hash. The header hash takes two additional options: :level (the header level within the document), :toc (whether the header should appear in the Table of Contents or not)
Calls superclass method
Glyph::Bookmark::new
# File lib/glyph/bookmark.rb, line 81 def initialize(hash) super(hash) @level = hash[:level] @toc = hash[:toc] end
Public Instance Methods
toc?()
click to toggle source
Returns true if the header is displayed in the Table of contents
# File lib/glyph/bookmark.rb, line 88 def toc? @toc end