### ----------------------------------------------------
### -- jmp
### -- Licenses: Artistic-2.0
### -- Authors: Nigel Hamilton
### -- File: lib/JMP/Template.rakumod
### ----------------------------------------------------

#| simple Template engine
class JMP::Template {
    method render (Str $string is copy, %params) {
        # globally substitute tokens found in the string for values from the params hash
        $string ~~ s:g/'[-' (<[a..z-]>+) '-]'/{ %params{$0} }/;
        return $string;
    }
}


