aboutsummaryrefslogtreecommitdiffstats
path: root/testing/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/templates/match-custom-enum.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/testing/templates/match-custom-enum.html b/testing/templates/match-custom-enum.html
new file mode 100644
index 0000000..cb45b8f
--- /dev/null
+++ b/testing/templates/match-custom-enum.html
@@ -0,0 +1,8 @@
+{% match color %}
+{% when Color::Rgb with (r, g, b) %}
+Colorful: #{{ "{:02X}"|format(r) }}{{ "{:02X}"|format(g) }}{{ "{:02X}"|format(b) }}
+{% when Color::GrayScale with (val) %}
+Gray: #{{ "{:02X}"|format(val) }}{{ "{:02X}"|format(val) }}{{ "{:02X}"|format(val) }}
+{% else %}
+CMYK not supported
+{% endmatch %}