class
Books::ChapterEntry
- Books::ChapterEntry
- Reference
- Object
Overview
Chapter entry from SUMMARY.md (parsed structure)
Defined in:
books.crbooks/summary_parser.cr
Constructors
Instance Method Summary
- #children : Array(ChapterEntry)
- #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 : String
Returns the formatted chapter number (e.g., "1.2.3")
-
#has_content? : Bool
Returns true if this chapter has content (not just a divider)
-
#is_part : Bool
ameba:disable Naming/QueryBoolMethods
-
#is_part=(is_part : Bool)
ameba:disable Naming/QueryBoolMethods
- #level : Int32
- #level=(level : Int32)
-
#link(book_name : String) : String
Get the link for this chapter (preserves directory structure)
- #number : Array(Int32)
- #number=(number : Array(Int32))
- #part=(value : Bool)
- #part? : Bool
- #path : String | Nil
- #path=(path : String | Nil)
-
#slug : String
Get the slug from path (preserves directory structure)
- #title : String
- #title=(title : String)
Constructor Detail
def self.new(title : String, path : Nil | String = nil, number : Array(Int32) = [] of Int32, level : Int32 = 0)
#
Instance Method Detail
Find the next chapter
def link(book_name : String) : String
#
Get the link for this chapter (preserves directory structure)