aggregatedMethodDocumentation function
Implementation
String aggregatedMethodDocumentation(Grammar grammar, int titleLevel) => [
'A [method](https://en.wikipedia.org/wiki/Method_(computer_programming)) is just a '
'[function](https://en.wikipedia.org/wiki/Function_(computer_programming)) '
'that lives inside an object. ',
'It does everything a function does, but it’s tied to the object it belongs to.'
'',
'A method can be used after an expression value and a . (dot) operator, ',
'',
"In example: 'Hello'.length()",
'Should result in: 5',
'',
parameterAndArgumentDocumentation(titleLevel, ParameterOwner.method),
'',
...grammar.methodsPerOwnerType.entries.map(
(entry) => [
markdownTitle(titleLevel, '${entry.key.toString().titleCase} Methods'),
entry.value
.map(
(methodSignature) => methodSignature.documentation
.createMarkdownDocumentation(grammar, titleLevel + 1),
)
.join('\n'),
].join('\n'),
),
'',
markdownTitle(titleLevel, 'Custom Methods'),
'You can use pre-packaged $templateEngineHyperLink methods or '
'add your own custom methods by manipulating the '
'Grammar.methods field.',
'See ${customMethodExample.toMarkdownLink()}',
].join('\n');