struct Symbol

Overview

A symbol is a constant that is identified by a name without you having to give it a numeric value.

:hello
:welcome
:"123"
:"symbol with spaces"

See Symbol literals in the language reference.

Internally a symbol is represented as an Int32, so it's very efficient.

You can't dynamically create symbols. When you compile your program, each symbol gets assigned a unique number.

Included Modules

Defined in:

hcl/to_hcl.cr

Instance Method Summary

Instance methods inherited from struct Value

==(other : HCL::Any) ==

Instance methods inherited from class Object

===(other : HCL::Any) ===

Class methods inherited from class Object

from_hcl(string_or_io : String | IO, ctx : HCL::ExpressionContext = HCL::ExpressionContext.default_context) from_hcl

Instance Method Detail

def to_hcl(builder : HCL::Builder) #