This is a TOML parser for loading a hash from a TOML document.
It supports version 0.1.0 of the TOML spec.
Is it awesome?
While this is indeed a fully functioning TOML parser, I wrote this as a personal exercise and for a series of blog posts describing how to use Parslet for parsing a simple text file format.
- Part 1 - Parsing TOML in Ruby with Parslet
- Part 2 - Annotating a TOML Parse Tree
- Part 3 - Transforming a TOML Parse Tree
- Part 4 - Displaying Errors in a TOML Document
It's set up as a ruby gem, but I'll only release it officially upon request.
require "toml-parslet" TOML.load File.read("example.toml")
Pull requests with tests, plz.