sikula / ruby-hcl

Ruby Parser for the Hashicorp Configuration Language
MIT License
14 stars 3 forks source link

ruby-hcl

Ruby Parser for the Hashicorp Configuration Language

Lexer

Parser


Hashicorp Configuration Language

Examples

  some_value "other_value" {
    key = "value"
  }

will create a hash which looks like:

{"some_value" => {"other_value" => {"key" => "value"}}}

Ruby-HCL Usage

require 'hcl'
require 'json'

contents = HCLParser.new.parse(File.read("file_to_parse.hcl"))
puts JSON.dump(contents)

TODO