kit-doc edge

Utils module
Kit::Doc::Services::Utils
View Source

Various utilities methods.


Link to this section Summary ⚠️ Private APIs are currently hidden.


Link to this section Class methods 7

If a class if module is defined in several files, removes the one that are nested, as it is probably just used as a namespace in that case.

Link to this method

.copy_assets(basepath:, list:)

View Source

Patched version that creates the needed directory (mkdir_p).

Sadly, as often with OOP, the original method is an instance one so it does not do us any good as we need to reuse it.

References

Link to this method

.htmlify(content:, markdown_variables: {}, markup: nil, yard_code_object: nil)

View Source

In the original code flow, the html rendering is done directly in templates.

This allows us to generate the rendered version from anywhere.

References

If a text matches a reference object, add a link to it.

Link to this method

.markup_for_file(filename:, content: '')

View Source

The original implementation has an implicit dependency on options. We bypass it by saving the value we need in the Kit config earlier.

References

Link to this method

.remove_html_entities(str)

View Source

Remove html entities from a string.

Remove html tags from a string.