{% nilable = /\:\:Nil|\?$/.match(type) %}
It doesn't seem to work: undefined macro method 'RegexLiteral#match'
.
Macros::StringLiteral
has =~
instance:
{% type = "Module::Nil" %}
{% p type =~ /\:\:Nil|\?$/ %} #=> true
{% type = "Module::Null" %}
{% p type =~ /\:\:Nil|\?$/ %} #=> false