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

Initialize a sidebar entry.



19
20
21
22
23
# File 'lib/utopia/project/sidebar.rb', line 19

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.



35
36
37
# File 'lib/utopia/project/sidebar.rb', line 35

def anchor
  @anchor
end

#levelObject (readonly)

The heading level (1-6).



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

def level
  @level
end

#title_htmlObject (readonly)

The HTML content of the heading.



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

def title_html
  @title_html
end