Sha256: 50dbc9a3fb3e3844ea58f760033853d448bfb9722df005a4db57a0231dcf0cbe

Contents?: true

Size: 349 Bytes

Versions: 6

Compression:

Stored size: 349 Bytes

Contents

require "toml-rb"
require_relative "toml_document"

module Lutaml
  module Model
    module TomlAdapter
      class TomlRbAdapter < TomlDocument
        def self.parse(toml, _options = {})
          data = TomlRB.parse(toml)
          new(data)
        end

        def to_toml(*)
          TomlRB.dump(to_h)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
lutaml-model-0.5.3 lib/lutaml/model/toml_adapter/toml_rb_adapter.rb
lutaml-model-0.5.2 lib/lutaml/model/toml_adapter/toml_rb_adapter.rb
lutaml-model-0.5.1 lib/lutaml/model/toml_adapter/toml_rb_adapter.rb
lutaml-model-0.5.0 lib/lutaml/model/toml_adapter/toml_rb_adapter.rb
lutaml-model-0.4.0 lib/lutaml/model/toml_adapter/toml_rb_adapter.rb
lutaml-model-0.3.30 lib/lutaml/model/toml_adapter/toml_rb_adapter.rb