class
TOML::Key
- TOML::Key
- Reference
- Object
Overview
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.
Defined in:
toml/key.crConstructors
Instance Method Summary
- #parts : Array(KeyPart)
-
#path : Array(String)
The logical path of this key as an
Array(String)(decoded). - #raw : String
-
#to_s(io : IO) : Nil
Convenience: shorthand for
path.join('.').
Constructor Detail
Instance Method Detail
def 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.