Sha256: 39b676454f3ef8119ec00882a1574c41c7d76e1509a3d371f1d5bf3a46da2683

Contents?: true

Size: 478 Bytes

Versions: 35

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

module Lutaml
  module Model
    module TomlAdapter
      # Base class for TOML objects
      class TomlObject
        attr_reader :attributes

        def initialize(attributes = {})
          @attributes = attributes
        end

        def [](key)
          @attributes[key]
        end

        def []=(key, value)
          @attributes[key] = value
        end

        def to_h
          @attributes
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
lutaml-model-0.5.4 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.5.3 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.5.2 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.5.1 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.5.0 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.4.0 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.30 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.29 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.28 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.27 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.26 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.25 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.24 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.23 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.22 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.21 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.20 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.19 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.18 lib/lutaml/model/toml_adapter/toml_object.rb
lutaml-model-0.3.17 lib/lutaml/model/toml_adapter/toml_object.rb