class Crystal::Macros::StringInterpolation

Overview

An interpolated string like "Hello, #{name}!".

Defined in:

compiler/crystal/macros.cr

Instance Method Summary

Instance Method Detail

def expressions : ArrayLiteral(ASTNode)Source

Returns a list of expressions that comprise the interpolated string.

These alternate between StringLiteral for the plaintext parts and ASTNodes of any type for the interpolated expressions.

© 2012–2021 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.2.1/Crystal/Macros/StringInterpolation.html