TOML::Document
Convenience method on Document itself.
Constructors
Instance methods
Removes the top-level KeyValueLine with the given bare key,
if any. Returns true if a line was deleted, false if no
such top-level key existed.
Returns the decoded value at the given dotted path, or nil
if the path does not exist or any intermediate segment is not
a table.
The path uses . as a separator. Quoted segments are not
supported here — if you need a key that contains a dot, use
Document#get(path : Array(String)) with an explicit array
of segments.
Sets a top-level key to value. If a top-level KeyValueLine
already exists for that key, only its value (and any trailing
comment if comment is given) is replaced — surrounding
whitespace and comments are preserved. Otherwise a new line
is inserted at the end of the top-level section (before the
first table header).
comment is the trailing comment text without the leading
#. Pass an empty string to clear an existing trailing
comment, nil to leave it untouched on update.
The current implementation operates on a single bare key. For
dotted paths or values inside [section] blocks, see issue
tracker — those are planned but not in v0.1.
Same as #set but also sets a trailing inline comment on the
line. The comment argument should not include the leading
#; it is added automatically with a single space prefix.