CodeTemplate

protocol CodeTemplate

Protocol all templates need to conform to

  • renders the modifiable to its corresponding string representation in source code

    Declaration

    Swift

    func render(_ modifiable: Modifiable) -> String

    Parameters

    modifiable

    modifiable

  • writes the rendered source code string representation to disk

    Declaration

    Swift

    func write(_ modifiable: Modifiable, to path: Path) throws -> URL?

    Parameters

    modifiable

    modifiable