Had to fix expression to show type as {{...}} isn't expanded in macro expression betweeh {% ... %}

This commit is contained in:
Tristan Ancelet
2026-08-14 14:19:38 -05:00
parent 8780be3a42
commit 4a0dcb8b59
+2 -2
View File
@@ -68,11 +68,11 @@ module CliGen
@format : ::Regex? = nil
)
{% unless T.has_method? :to_s %}
{% raise "ERROR : Flag({{T}}) : Error your flag type must have a to_s method" %}
{% raise "ERROR : Flag(#{T}) : Error your flag type must have a to_s method" %}
{% end %}
{% if T <= Array %}
{% elem = T.type_vars.first %}
{% raise "ERROR : Flag({{T}}) : Error your flag subtype must have a to_s method" unless elem.has_method? :to_s %}
{% raise "ERROR : Flag(#{T}) : Error your flag subtype must have a to_s method" unless elem.has_method? :to_s %}
{% end %}
meta = FlagMeta.new(
type: {{T.stringify}},