class

Books::ChapterEntry

Inherits Reference / Object

Chapter entry from SUMMARY.md (parsed structure)

Constructors

new(title : String, path : Nil | String = nil, number : Array(Int32) = [] of Int32, level : Int32 = 0)

Instance methods

children
children=(children : Array(ChapterEntry))
find_next(flat : Array(ChapterEntry)) : ChapterEntry | Nil

Find the next chapter

find_prev(flat : String) : ChapterEntry | Nil

Find the previous chapter

formatted_number

Returns the formatted chapter number (e.g., "1.2.3")

has_content?

Returns true if this chapter has content (not just a divider)

is_part

ameba:disable Naming/QueryBoolMethods

is_part=(is_part : Bool)

ameba:disable Naming/QueryBoolMethods

level
level=(level : Int32)
number
number=(number : Array(Int32))
part=(value : Bool)
part?
path
path=(path : String | Nil)
slug

Get the slug from path (preserves directory structure)

title
title=(title : String)