Sha256: 488d5a61b7e047b42f44fa84b282551b23f237eb15d248ce471e70af7c07ccd5

Contents?: true

Size: 441 Bytes

Versions: 3

Compression:

Stored size: 441 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.load(toml)
          new(data)
        end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lutaml-model-0.3.1 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.0 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.2.1 lib/lutaml/model/toml_adapter/tomlib_adapter.rb