Skip to content

class Crystal::Macros::NamedTupleLiteral
inherits Crystal::Macros::ASTNode

A named tuple literal.

Methods

#[](key : SymbolLiteral | StringLiteral | MacroId) : ASTNode

Similar to NamedTuple#[] but returns NilLiteral if key is undefined.

View source

#[]=(key : SymbolLiteral | StringLiteral | MacroId, value : ASTNode) : ASTNode

Adds or replaces a key.

View source

#double_splat(trailing_string : StringLiteral = nil) : MacroId

View source

#each(&) : Nil

Similar to NamedTuple#each

View source

#each_with_index(&) : Nil

View source