class

TOML::Key

Inherits Reference < Object

A possibly-dotted key, e.g. physical.shape or "a"."b".c. Stored as the ordered list of its parts plus the verbatim raw source text (including any whitespace around the dots), so the serializer can re-emit the key byte-for-byte.

Constructors

new(parts : Array(KeyPart), raw : String)
Source

Instance methods

parts
Source
path

The logical path of this key as an Array(String) (decoded).

Source
to_s(io : IO) : Nil

Convenience: shorthand for path.join('.'). Useful for error messages but not for storage — TOML keys with dots in them are legal and would round-trip incorrectly through this method.

Source