require 'rupkl' pkl = <<~'PKL' // From: // https://pkl-lang.org/main/current/language-tutorial/01_basic_config.html name = "Pkl: Configure your Systems in New Ways" attendants = 100 isInteractive = true amountLearned = 13.37 PKL RuPkl.load(pkl) # => # {:name=>"Pkl:Configure your Systems in New Ways", # :attendants=>100, # :isInteractive=>true, # :amountLearned=>13.37} File.open('sample.pkl', 'w')