Class: Utopia::Project::Sidebar::Entry
- Inherits:
-
Object
- Object
- Utopia::Project::Sidebar::Entry
- Defined in:
- lib/utopia/project/sidebar.rb
Overview
Represents a sidebar navigation entry with title, level, and anchor.
Instance Attribute Summary collapse
-
#anchor ⇒ Object
readonly
The anchor ID for linking to this heading.
-
#level ⇒ Object
readonly
The heading level (1-6).
-
#title_html ⇒ Object
readonly
The HTML content of the heading.
Instance Method Summary collapse
-
#initialize(title_html, level, anchor) ⇒ Entry
constructor
A new instance of Entry.
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
#anchor ⇒ Object (readonly)
The anchor ID for linking to this heading.
31 32 33 |
# File 'lib/utopia/project/sidebar.rb', line 31 def anchor @anchor end |
#level ⇒ Object (readonly)
The heading level (1-6).
27 28 29 |
# File 'lib/utopia/project/sidebar.rb', line 27 def level @level end |
#title_html ⇒ Object (readonly)
The HTML content of the heading.
23 24 25 |
# File 'lib/utopia/project/sidebar.rb', line 23 def title_html @title_html end |