Sha256: dc3fa955571666bb11bf665afd30662c3991e73438b03263f25ab38e5a8b4a78

Contents?: true

Size: 392 Bytes

Versions: 27

Compression:

Stored size: 392 Bytes

Contents

require "tomlib"
require_relative "toml_document"

module Lutaml
  module Model
    module TomlAdapter
      class TomlibAdapter < TomlDocument
        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

27 entries across 27 versions & 1 rubygems

Version Path
lutaml-model-0.3.28 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.27 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.26 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.25 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.24 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.23 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.22 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.21 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.20 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.19 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.18 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.17 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.16 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.15 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.14 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.13 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.12 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.11 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.10 lib/lutaml/model/toml_adapter/tomlib_adapter.rb
lutaml-model-0.3.9 lib/lutaml/model/toml_adapter/tomlib_adapter.rb