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)
Source

Instance methods

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

Find the next chapter

Source
find_prev(flat : String) : ChapterEntry | Nil

Find the previous chapter

Source
formatted_number

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

Source
has_content?

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

Source
is_part

ameba:disable Naming/QueryBoolMethods

Source
is_part=(is_part : Bool)

ameba:disable Naming/QueryBoolMethods

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

Get the slug from path (preserves directory structure)

Source
title
Source
title=(title : String)
Source