Skip to content
Snippets Groups Projects
Commit 49104b68 authored by Etienne Kneuss's avatar Etienne Kneuss Committed by Nicolas Voirol
Browse files

Better asString for models

parent 719ccd03
Branches
Tags
No related merge requests found
......@@ -40,8 +40,9 @@ trait AbstractModel[+This <: Model with AbstractModel[This]]
"Model()"
} else {
(for ((k,v) <- mapping.toSeq.sortBy(_._1)) yield {
f" ${k.asString}%-20s -> ${v.asString}"
}).mkString("Model(\n", ",\n", ")")
val valuePadded = v.asString.replaceAll("\n", "\n"+(" "*26))
f" ${k.asString}%-20s -> ${valuePadded}"
}).mkString("Model(\n", ",\n", "\n)")
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment