Module: RubyLLM::Toolbox::Toml

Defined in:
lib/ruby_llm/toolbox/toml.rb

Overview

A small, dependency-free TOML parser. Covers the common surface of TOML 1.0 used by real config files: comments; bare/quoted/dotted keys;

tables

and [[arrays of tables]]; basic/literal strings and their

multiline forms; integers (with underscores and 0x/0o/0b), floats (exponents, inf, nan), booleans; offset/local date-times, dates and times (kept as strings); arrays (multiline, nested, heterogeneous); and inline tables. Returns nested Hashes/Arrays with string keys, ready for JSON output or DataPath navigation.

Defined Under Namespace

Classes: ParseError, Parser

Class Method Summary collapse

Class Method Details

.parse(text) ⇒ Object



18
19
20
# File 'lib/ruby_llm/toolbox/toml.rb', line 18

def parse(text)
  Parser.new(text).parse
end