class Crystal::Macros::Select
Overview
A select
expression.
Every expression node
is equivalent to:
select
{% for when_clause in node.whens %}
{{ when_clause }}
{% end %}
{% else_clause = node.else %}
{% unless else_clause.is_a?(Nop) %}
else
{{ else_clause }}
{% end %}
end
Defined in:
compiler/crystal/macros.crInstance Method Summary
-
#else : ASTNode
Returns the
#else
of thisselect
. -
#whens : ArrayLiteral(When)
Returns the
when
s of thisselect
.