[docs] Improve searchability of "Methods" section (#625)

This commit is contained in:
Josh B
2024-08-19 15:54:46 -07:00
committed by Daniel Chao
parent 825135a0f8
commit b28cdcd631

View File

@@ -2006,7 +2006,8 @@ pigeon: ParentBird = new {
[[methods]]
== Methods
Modules and classes can define methods.
Pkl methods can be defined on classes and modules using the `function` keyword.
Methods may access properties of their containing type.
Submodules and subclasses can override them.
Like Java and most other object-oriented languages, Pkl uses _single dispatch_ -- methods are dynamically dispatched based on the receiver's runtime type.