wcl — Ruby bindings for WCL

Ruby bindings for WCL (Wil's Configuration Language), powered by a WASM runtime. Ruby 3.1+.

Install

gem install wcl

Usage

require "wcl"

doc = Wcl.parse(<<~WCL)
    server web {
        port = 8080
        host = "localhost"
    }
WCL

puts doc.values
# {"server"=>{"web"=>{"port"=>8080, "host"=>"localhost"}}}

servers = doc.blocks_of_type("server")
puts "Found #{servers.length} server(s)"

License

MIT