Sha256: 7ab8d7913dc20e3f007812e5b44537b575226114cee2177e1837cd9640488c2f

Contents?: true

Size: 418 Bytes

Versions: 1

Compression:

Stored size: 418 Bytes

Contents

# lib/lutaml/model/toml_adapter/tomlib_adapter.rb
require "tomlib"
require_relative "../toml_adapter"

module Lutaml
  module Model
    module TomlAdapter
      class TomlibDocument < Document
        def self.parse(toml)
          data = Tomlib::Parser.new(toml).parsed
          new(data)
        end

        def to_toml(*args)
          Tomlib::Generator.new(to_h).toml_str
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lutaml-model-0.1.0 lib/lutaml/model/toml_adapter/tomlib_adapter.rb