I would like to get rid of the brackets / brackets in the following expression in DSL:
substitute ("hello {0}" using "world")
The rest of the code is as follows:
class Rule(format: String) { def using(arggs: String*): Rule = { return this } def execute() = { } } def substitute(rule: Rule) = rule.execute() implicit def makeRule(format: String) = new Rule(format)
I tried the apply () method, but I don't think I can do it. Is there scala magic that I could use?
source share