summaryrefslogtreecommitdiff
path: root/scripts/toy/play.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/toy/play.groovy')
-rw-r--r--scripts/toy/play.groovy10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/toy/play.groovy b/scripts/toy/play.groovy
index 03f6c80..2078d0b 100644
--- a/scripts/toy/play.groovy
+++ b/scripts/toy/play.groovy
@@ -59,6 +59,16 @@
],
'activities': activityList
];
+ // Expand wildcards
+ final expandWildcards = { list ->
+ list
+ .findAll { a -> a && a.startsWith("*") }
+ .collect { a -> list.remove(a); return a.substring(1).split(",") }
+ .collectMany { tags -> activityList.values().findAll(matchTags(tags))*.name }
+ .forEach { a -> list.add(a) };
+ }
+ DOMME.sessions*.phases*.activities*.forEach { expandWildcards(it); }
+ DOMME.sessions*.phases*.intervals*.forEach { expandWildcards(it); }
final eval = { expr -> Eval.me('toy', playScope, expr.toString()) };
if (stateIs("DEBUG")) {
// Check everything in DOMME evaluates and resolves