Class: Utopia::Project::Sidebar::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/utopia/project/sidebar.rb

Overview

Represents a sidebar navigation entry with title, level, and anchor.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title_html, level, anchor) ⇒ Entry

Returns a new instance of Entry.



15
16
17
18
19
# File 'lib/utopia/project/sidebar.rb', line 15

def initialize(title_html, level, anchor)
  @title_html = title_html
  @level = level
  @anchor = anchor
end

Instance Attribute Details

#anchorObject (readonly)

The anchor ID for linking to this heading.



31
32
33
# File 'lib/utopia/project/sidebar.rb', line 31

def anchor
  @anchor
end

#levelObject (readonly)

The heading level (1-6).



27
28
29
# File 'lib/utopia/project/sidebar.rb', line 27

def level
  @level
end

#title_htmlObject (readonly)

The HTML content of the heading.



23
24
25
# File 'lib/utopia/project/sidebar.rb', line 23

def title_html
  @title_html
end